Method: EasyApiDoc::Configurable#load_children
- Defined in:
- lib/configurable.rb
#load_children(klass, nodename = nil, options = {}) ⇒ Object
65 66 67 68 69 70 71 72 73 |
# File 'lib/configurable.rb', line 65 def load_children(klass, nodename = nil, = {}) ref = (nodename ? @attributes[nodename] : @attributes) || [] parents = @parents.merge(self.class.to_s.split("::").last.downcase => self) ref.map do |name, opts| next if [:exclude] && [:exclude].include?(name) opts = opts.merge([:extra_attributes]) if [:extra_attributes] klass.new(name, opts, parents) end.compact end |