| 1 | package Hubot::Adapter; | ||
| 2 | 6 | $Hubot::Adapter::VERSION = '0.2.8'; | |
| 3 | 6 | ▶ | use Moose; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 4 | 6 | ▶ | use namespace::autoclean; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 5 | |||
| 6 | 6 | extends 'Hubot::EventEmitter'; | |
| 7 | |||
| 8 | 6 | has 'robot' => ( is => 'ro', isa => 'Hubot::Robot' ); | |
| 9 | |||
| 10 | 0 | ▶ | sub send { } |
|
Subroutine
send: not called CC=1 SCAR=0.0
Pod
undocumented
| |||
| 11 | 0 | ▶ | sub whisper { } |
|
Subroutine
whisper: not called CC=1 SCAR=0.0
Pod
undocumented
| |||
| 12 | 0 | ▶ | sub reply { } |
|
Subroutine
reply: not called CC=1 SCAR=0.0
Pod
undocumented
| |||
| 13 | 0 | ▶ | sub run { } |
|
Subroutine
run: not called CC=1 SCAR=0.0
Pod
undocumented
| |||
| 14 | 0 | ▶ | sub close { } |
|
Subroutine
close: not called CC=1 SCAR=0.0
Pod
undocumented
| |||
| 15 | 0 | ▶ | sub exist { } |
|
Subroutine
exist: not called CC=1 SCAR=0.0
Pod
undocumented
| |||
| 16 | |||
| 17 | 20 | ▶ | sub receive { shift->robot->receive(@_) } |
|
Subroutine
receive: called CC=1 SCAR=0.0
Pod
undocumented
| |||
| 18 | 0 | ▶ | sub users { shift->robot->users } |
|
Subroutine
users: not called CC=1 SCAR=6.9
Pod
undocumented
| |||
| 19 | 20 | ▶ | sub userForId { shift->robot->userForId(@_) } |
|
Subroutine
userForId: called CC=1 SCAR=0.0
Pod
undocumented
| |||
| 20 | 0 | ▶ | sub userForName { shift->robot->userForName(@_) } |
|
Subroutine
userForName: not called CC=1 SCAR=6.9
Pod
undocumented
| |||
| 21 | 0 | ▶ | sub usersForFuzzyRawName { shift->robot->usersForFuzzyRawName(@_) } |
|
Subroutine
usersForFuzzyRawName: not called CC=1 SCAR=6.9
Pod
undocumented
| |||
| 22 | 0 | ▶ | sub usersForFuzzyName { shift->robot->usersForFuzzyName(@_) } |
|
Subroutine
usersForFuzzyName: not called CC=1 SCAR=6.9
Pod
undocumented
| |||
| 23 | 0 | ▶ | sub http { shift->robot->http(@_) } |
|
Subroutine
http: not called CC=1 SCAR=6.9
Pod
undocumented
| |||
| 24 | |||
| 25 | 6 | __PACKAGE__->meta->make_immutable; | |
| 26 | |||
| 27 | 6 | 1; | |
| 28 | |||
| 29 | =pod | ||
| 30 | |||
| 31 | =encoding utf-8 | ||
| 32 | |||
| 33 | =head1 NAME | ||
| 34 | |||
| 35 | Hubot::Adapter - specific interface to a chat source for robots. | ||
| 36 | |||
| 37 | =head1 VERSION | ||
| 38 | |||
| 39 | version 0.2.8 | ||
| 40 | |||
| 41 | =head1 SYNOPSIS | ||
| 42 | |||
| 43 | use Hubot::Robot; | ||
| 44 | my $robot = Hubot::Robot->new({ | ||
| 45 | adapter => 'Shell', | ||
| 46 | name => 'hubot' | ||
| 47 | }); | ||
| 48 | |||
| 49 | $robot->adapter->on('connected', sub { | ||
| 50 | ## do something | ||
| 51 | }); | ||
| 52 | |||
| 53 | ## Hubot::Adapter::XXX | ||
| 54 | ## `ADAPTER` must implements `run` method | ||
| 55 | sub run { | ||
| 56 | my $self = shift; | ||
| 57 | ## do something | ||
| 58 | $self->emit('connected'); | ||
| 59 | } | ||
| 60 | |||
| 61 | =head1 DESCRIPTION | ||
| 62 | |||
| 63 | Adapters are the interface to the service you want your hubot to run on. | ||
| 64 | |||
| 65 | =head1 AVAILABLE ADAPTERS | ||
| 66 | |||
| 67 | =head2 BUILT IN | ||
| 68 | |||
| 69 | =over | ||
| 70 | |||
| 71 | =item L<Shell|Hubot::Adapter::Shell> | ||
| 72 | |||
| 73 | =item L<IRC|Hubot::Adapter::Irc> | ||
| 74 | |||
| 75 | =item L<Campfire|Hubot::Adapter::Campfire> | ||
| 76 | |||
| 77 | =back | ||
| 78 | |||
| 79 | =head1 AUTHOR | ||
| 80 | |||
| 81 | Hyungsuk Hong <hshong@perl.kr> | ||
| 82 | |||
| 83 | =head1 COPYRIGHT AND LICENSE | ||
| 84 | |||
| 85 | This software is copyright (c) 2012 by Hyungsuk Hong. | ||
| 86 | |||
| 87 | This is free software; you can redistribute it and/or modify it under | ||
| 88 | the same terms as the Perl 5 programming language system itself. | ||
| 89 | |||
| 90 | =cut | ||