Class: Cfer::Core::Resource::Handle

Inherits:
Object
  • Object
show all
Defined in:
lib/cfer/core/resource.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name) ⇒ Handle

Returns a new instance of Handle.



7
8
9
# File 'lib/cfer/core/resource.rb', line 7

def initialize(name)
  @name = name.to_s
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(method) ⇒ Object



15
16
17
# File 'lib/cfer/core/resource.rb', line 15

def method_missing(method)
  Functions::Fn::get_att(name, method.to_s.camelize)
end

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



6
7
8
# File 'lib/cfer/core/resource.rb', line 6

def name
  @name
end

Instance Method Details

#refObject



11
12
13
# File 'lib/cfer/core/resource.rb', line 11

def ref
  Functions::Fn::ref(name)
end