class Sequoia::Store

Class: Simple container to store internal config

It exists only to make a difference between hash value and internal data

Public Class Methods

new(hash={}) click to toggle source

Private: Initialize new Store

Params:

  • hash {Hash} Hash object to convert

# File lib/sequoia/store.rb, line 29
def initialize(hash={})
  merge!(hash)
end

Public Instance Methods

deep_merge!(store) click to toggle source
# File lib/sequoia/store.rb, line 9
def deep_merge!(store)
  store.each_pair do |key, value|
    if self[key].is_a?(Store)
      self[key].deep_merge!(value)
    else
      self[key] = value
    end
  end

  self
end