Method: Constree::Node#sub_nodes
- Defined in:
- lib/constree/node.rb
#sub_nodes ⇒ Object
31 32 33 34 35 36 37 |
# File 'lib/constree/node.rb', line 31 def sub_nodes return [] unless constant.is_a? Module constant.constants.sort!.map! do |name| const_value = constant.const_get(name) Node.new(const_value, name, self) end end |