Class: MagnumPI::API::Resources

Inherits:
DSL
  • Object
show all
Defined in:
lib/magnum-pi/api/resources.rb

Defined Under Namespace

Classes: Variable

Instance Method Summary collapse

Methods inherited from DSL

#[], #class, #deep_clone, #initialize, #inspect, #slice, #to_hash, #to_s

Constructor Details

This class inherits a constructor from MagnumPI::DSL

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class MagnumPI::DSL

Instance Method Details

#var(name) ⇒ Object



9
10
11
12
13
# File 'lib/magnum-pi/api/resources.rb', line 9

def var(name)
  Variable.new.tap do |variable|
    variable.name = name
  end
end