Class: Ralyxa::Handler
- Inherits:
-
Object
- Object
- Ralyxa::Handler
- Defined in:
- lib/ralyxa/handler.rb
Instance Method Summary collapse
- #card(title, body, image_url = nil, card_class = Ralyxa::Card) ⇒ Object
- #handle ⇒ Object
-
#initialize(request, intent_proc) ⇒ Handler
constructor
A new instance of Handler.
Constructor Details
#initialize(request, intent_proc) ⇒ Handler
Returns a new instance of Handler.
6 7 8 9 |
# File 'lib/ralyxa/handler.rb', line 6 def initialize(request, intent_proc) @request = request @intent_proc = intent_proc end |
Instance Method Details
#card(title, body, image_url = nil, card_class = Ralyxa::Card) ⇒ Object
23 24 25 |
# File 'lib/ralyxa/handler.rb', line 23 def card(title, body, image_url = nil, card_class = Ralyxa::Card) card_class.as_hash(title, body, image_url) end |
#handle ⇒ Object
11 12 13 |
# File 'lib/ralyxa/handler.rb', line 11 def handle instance_eval &@intent_proc end |