Method: NsOptions::NamespaceData#build_from
- Defined in:
- lib/ns-options/namespace_data.rb
#build_from(other_ns_data) ⇒ Object
91 92 93 94 95 96 97 98 99 100 101 102 |
# File 'lib/ns-options/namespace_data.rb', line 91 def build_from(other_ns_data) set_option_type_class(other_ns_data.option_type_class) other_ns_data..each do |name, opt| add_option(name, opt.type_class, opt.rules) end other_ns_data.child_namespaces.each do |name, ns| new_ns = add_namespace(name) new_ns.build_from(ns) end end |