class Array
Public Instance Methods
expand_el()
click to toggle source
# File lib/cfoo/parser.rb, line 46 def expand_el map {|element| element.expand_el } end
join_adjacent_strings()
click to toggle source
# File lib/cfoo/array.rb, line 2 def join_adjacent_strings return clone if empty? self[1..-1].inject([first]) do |combined_parts, part| previous = combined_parts.pop if previous.class == String && part.class == String combined_parts << previous + part else combined_parts << previous << part end end end