Class: Configurations::Maps::Writers::Default
- Inherits:
-
Object
- Object
- Configurations::Maps::Writers::Default
- Defined in:
- lib/configurations/maps/writers/default.rb
Instance Method Summary collapse
-
#initialize(&block) ⇒ Default
constructor
A new instance of Default.
- #write(map, path, value) ⇒ Object
Constructor Details
#initialize(&block) ⇒ Default
Returns a new instance of Default.
6 7 8 |
# File 'lib/configurations/maps/writers/default.rb', line 6 def initialize(&block) @entry_block = block end |
Instance Method Details
#write(map, path, value) ⇒ Object
10 11 12 |
# File 'lib/configurations/maps/writers/default.rb', line 10 def write(map, path, value) map[path.to_s] = @entry_block.call(value) end |