Class: Array
Instance Method Summary collapse
Instance Method Details
#to_hash ⇒ Object
18 19 20 21 22 23 |
# File 'lib/plasma/interpreter/class_mods.rb', line 18 def to_hash hash = {} self.each {|key, value| hash[key] = value} return hash end |
#to_plasma ⇒ Object
25 26 27 28 29 30 31 |
# File 'lib/plasma/interpreter/class_mods.rb', line 25 def to_plasma plasma = self.map do |p| p.to_plasma end.join ' ' return "[#{plasma}]" end |