Module: HireFire::Resource
Instance Attribute Summary collapse
-
#dynos ⇒ Array
The configured dynos.
Instance Method Summary collapse
-
#configure {|HireFire::Resource| ... } ⇒ Object
Sets the ‘@dynos` instance variable to an empty Array to hold all the dyno configuration.
-
#dyno(name, &block) ⇒ Object
Will be used through block-style configuration with the ‘configure` method.
Instance Attribute Details
#dynos ⇒ Array
Returns The configured dynos.
9 10 11 |
# File 'lib/hirefire/resource.rb', line 9 def dynos @dynos end |
Instance Method Details
#configure {|HireFire::Resource| ... } ⇒ Object
Sets the ‘@dynos` instance variable to an empty Array to hold all the dyno configuration.
22 23 24 25 |
# File 'lib/hirefire/resource.rb', line 22 def configure @dynos ||= [] yield self end |
#dyno(name, &block) ⇒ Object
Will be used through block-style configuration with the ‘configure` method.
32 33 34 |
# File 'lib/hirefire/resource.rb', line 32 def dyno(name, &block) @dynos << { :name => name, :quantity => block } end |