class Array
Public Instance Methods
flatten_one_level()
click to toggle source
# File lib/sup/util.rb, line 614 def flatten_one_level inject([]) { |a, e| a + e } end
last=(e;)
click to toggle source
# File lib/sup/util.rb, line 623 def last= e; self[-1] = e end
nonempty?()
click to toggle source
# File lib/sup/util.rb, line 624 def nonempty?; !empty? end
rest()
click to toggle source
# File lib/sup/util.rb, line 619 def rest; self[1..-1]; end
to_boolean_h()
click to toggle source
# File lib/sup/util.rb, line 621 def to_boolean_h; Hash[*map { |x| [x, true] }.flatten]; end
to_h()
click to toggle source
# File lib/sup/util.rb, line 618 def to_h; Hash[*flatten]; end