Class: Ironment::Populator
- Inherits:
-
Object
- Object
- Ironment::Populator
- Defined in:
- lib/ironment/populator.rb
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Populator
constructor
A new instance of Populator.
- #populate_with(runcom) ⇒ Object
Constructor Details
#initialize(options = {}) ⇒ Populator
Returns a new instance of Populator.
3 4 5 |
# File 'lib/ironment/populator.rb', line 3 def initialize( = {}) @env = [:env] || ENV end |
Instance Method Details
#populate_with(runcom) ⇒ Object
7 8 9 10 11 12 13 |
# File 'lib/ironment/populator.rb', line 7 def populate_with(runcom) enum = runcom.each_pair loop do @env.[]= *enum.next end end |