Class: TelegramBot::EventHandler::Handler
- Inherits:
-
Object
- Object
- TelegramBot::EventHandler::Handler
- Defined in:
- lib/telegram_bot/handler.rb
Instance Attribute Summary collapse
-
#action ⇒ Object
Returns the value of attribute action.
-
#matcher ⇒ Object
Returns the value of attribute matcher.
-
#pass ⇒ Object
Returns the value of attribute pass.
Instance Method Summary collapse
- #===(msg) ⇒ Object
- #arguments(msg) ⇒ Object
-
#initialize(matcher, action, pass) ⇒ Handler
constructor
A new instance of Handler.
- #pass? ⇒ Boolean
Constructor Details
#initialize(matcher, action, pass) ⇒ Handler
Returns a new instance of Handler.
12 13 14 15 16 |
# File 'lib/telegram_bot/handler.rb', line 12 def initialize(matcher, action, pass) @matcher = matcher @action = action @pass = pass end |
Instance Attribute Details
#action ⇒ Object
Returns the value of attribute action.
10 11 12 |
# File 'lib/telegram_bot/handler.rb', line 10 def action @action end |
#matcher ⇒ Object
Returns the value of attribute matcher.
10 11 12 |
# File 'lib/telegram_bot/handler.rb', line 10 def matcher @matcher end |
#pass ⇒ Object
Returns the value of attribute pass.
10 11 12 |
# File 'lib/telegram_bot/handler.rb', line 10 def pass @pass end |
Instance Method Details
#===(msg) ⇒ Object
22 23 24 |
# File 'lib/telegram_bot/handler.rb', line 22 def ===(msg) @matcher === msg end |
#arguments(msg) ⇒ Object
26 27 28 |
# File 'lib/telegram_bot/handler.rb', line 26 def arguments(msg) @matcher.arguments(msg) end |
#pass? ⇒ Boolean
18 19 20 |
# File 'lib/telegram_bot/handler.rb', line 18 def pass? @pass end |