Module: Disposable::Twin::Property::Hash::NestedDefaults

Defined in:
lib/disposable/twin/property/hash.rb

Overview

NestedDefaults for properties nested in the top :hash column.

Class Method Summary collapse

Class Method Details

.included(includer) ⇒ Object



30
31
32
33
34
35
36
37
38
# File 'lib/disposable/twin/property/hash.rb', line 30

def self.included(includer)
  includer.defaults do |name, options|
    if options[:_nested_builder] # DISCUSS: any other way to figure out we're nested?
      Hash.hash_options
    else
      { }
    end
  end
end