Method: Spree::Core::NestedClassSet#initialize

Defined in:
lib/spree/core/nested_class_set.rb

#initialize(hash = {}) ⇒ NestedClassSet

Returns a new instance of NestedClassSet.



10
11
12
13
14
15
16
17
# File 'lib/spree/core/nested_class_set.rb', line 10

def initialize(hash = {})
  @klass_sets = hash.map do |key, value|
    [
      key.to_s,
      ClassConstantizer::Set.new(default: value)
    ]
  end.to_h
end