Class: Daneel::Scripts::Echo
- Inherits:
-
Daneel::Script
- Object
- Plugin
- Daneel::Script
- Daneel::Scripts::Echo
- Defined in:
- lib/daneel/scripts/echo.rb
Instance Attribute Summary
Attributes inherited from Plugin
Instance Method Summary collapse
Methods inherited from Daneel::Script
#accepts?, files, inherited, list
Methods inherited from Plugin
#initialize, #logger, requires_env
Constructor Details
This class inherits a constructor from Daneel::Plugin
Instance Method Details
#help ⇒ Object
15 16 17 |
# File 'lib/daneel/scripts/echo.rb', line 15 def help {"echo TEXT" => "are you copying me? stop copying me!"} end |
#receive(room, message, user) ⇒ Object
7 8 9 10 11 12 13 |
# File 'lib/daneel/scripts/echo.rb', line 7 def receive(room, , user) case .command when /^(?:echo|say)\s(.+)/ room.say $1 .done! end end |