Module: ExaltedMath::Maths::List2
- Defined in:
- lib/exalted_math/math.rb
Instance Method Summary collapse
Instance Method Details
#asts ⇒ Object
821 822 823 824 825 |
# File 'lib/exalted_math/math.rb', line 821 def asts elem_list = [] dig(elem_list, elements) elem_list.map! { |e| e.ast } end |
#dig(values, elements) ⇒ Object
813 814 815 816 817 818 819 |
# File 'lib/exalted_math/math.rb', line 813 def dig(values, elements) elements.each do |elem| values << elem if elem.respond_to?(:value) dig(values, elem.elements) if elem.elements end values end |