Method: LazyGraph::Builder::DSL#default
- Defined in:
- lib/lazy_graph/builder/dsl.rb
#default(value) ⇒ Object
29 30 31 32 33 34 35 36 37 38 39 |
# File 'lib/lazy_graph/builder/dsl.rb', line 29 def default(value) schema[:default] = \ if value.is_a?(Hash) HashUtils.deep_merge(schema.fetch(:default, {}), value) elsif value.is_a?(Array) schema.fetch(:default, []).concat(value).uniq! else value end self end |