Class: Nodectl::Binding

Inherits:
Object
  • Object
show all
Defined in:
lib/nodectl/binding.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#recipeObject (readonly)

Returns the value of attribute recipe.



3
4
5
# File 'lib/nodectl/binding.rb', line 3

def recipe
  @recipe
end

#serviceObject (readonly)

Returns the value of attribute service.



2
3
4
# File 'lib/nodectl/binding.rb', line 2

def service
  @service
end