Module: Schema::DataStructure::Build
- Defined in:
- lib/schema/data_structure.rb
Instance Method Summary collapse
Instance Method Details
#build(data = nil, strict = nil) ⇒ Object
22 23 24 25 26 27 28 29 30 31 32 33 34 |
# File 'lib/schema/data_structure.rb', line 22 def build(data=nil, strict=nil) data ||= {} strict ||= false new.tap do |instance| if not data.empty? instance.transform_read(data) set_attributes(instance, data, strict) end instance.configure_dependencies end end |