Class: Zenvelope::Action
- Inherits:
-
Object
- Object
- Zenvelope::Action
- Defined in:
- lib/zenvelope.rb
Overview
Subclass that provides the “action”, i.e. the “get” in “host.get”
Instance Method Summary collapse
-
#initialize(verb, parent) ⇒ Action
constructor
A new instance of Action.
- #method_missing(method, *args) ⇒ Object
Constructor Details
#initialize(verb, parent) ⇒ Action
Returns a new instance of Action.
14 15 16 17 |
# File 'lib/zenvelope.rb', line 14 def initialize(verb, parent) @verb = verb @parent = parent end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method, *args) ⇒ Object
19 20 21 |
# File 'lib/zenvelope.rb', line 19 def method_missing(method, *args) @parent.query([@verb, '.', method].join, args.first) end |