Class: Configurations::Maps::Writers::Default

Inherits:
Object
  • Object
show all
Defined in:
lib/configurations/maps/writers/default.rb

Instance Method Summary collapse

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