Class: Nodectl::Binding
- Inherits:
-
Object
- Object
- Nodectl::Binding
- Defined in:
- lib/nodectl/binding.rb
Instance Attribute Summary collapse
-
#recipe ⇒ Object
readonly
Returns the value of attribute recipe.
-
#service ⇒ Object
readonly
Returns the value of attribute service.
Instance Method Summary collapse
-
#initialize(service, recipe) ⇒ Binding
constructor
A new instance of Binding.
- #method_missing(name, *args, &blk) ⇒ Object
Constructor Details
#initialize(service, recipe) ⇒ Binding
Returns a new instance of Binding.
5 6 7 8 |
# File 'lib/nodectl/binding.rb', line 5 def initialize(service, recipe) @service = service @recipe = recipe end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(name, *args, &blk) ⇒ Object
10 11 12 |
# File 'lib/nodectl/binding.rb', line 10 def method_missing(name, *args, &blk) @recipe.public_send(name, @service, *args, &blk) end |
Instance Attribute Details
#recipe ⇒ Object (readonly)
Returns the value of attribute recipe.
3 4 5 |
# File 'lib/nodectl/binding.rb', line 3 def recipe @recipe end |
#service ⇒ Object (readonly)
Returns the value of attribute service.
2 3 4 |
# File 'lib/nodectl/binding.rb', line 2 def service @service end |