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.
8 9 10 |
# File 'lib/hirefire/resource.rb', line 8 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.
20 21 22 23 |
# File 'lib/hirefire/resource.rb', line 20 def configure @dynos ||= [] yield self end |
#dyno(name, &block) ⇒ Object
Will be used through block-style configuration with the ‘configure` method.
29 30 31 |
# File 'lib/hirefire/resource.rb', line 29 def dyno(name, &block) @dynos << { :name => name, :quantity => block } end |