class Configurations::Maps::Data

Public Class Methods

new( reader = Readers::Tolerant.new, writer = Writers::Default.new { |value| Entry.new(value) } ) click to toggle source
# File lib/configurations/maps/data.rb, line 10
def initialize(
  reader = Readers::Tolerant.new,
  writer = Writers::Default.new { |value|
    Entry.new(value)
  }
)
  @map = {}
  @reader = reader
  @writer = writer
end

Public Instance Methods

add_entry(path, value) click to toggle source
# File lib/configurations/maps/data.rb, line 25
def add_entry(path, value)
  @writer.write(@map, path, value)
end
nested?(path) click to toggle source
# File lib/configurations/maps/data.rb, line 21
def nested?(path)
  @reader.read(@map, path)
end