lib/ronin/code/symbol_table.rb in ronin-0.1.1 vs lib/ronin/code/symbol_table.rb in ronin-0.1.2

- old
+ new

@@ -51,9 +51,22 @@ def symbol(name) @table[name.to_s] end # + # Returns a Hash of the symbol names and their values. + # + def symbols + hash = {} + + @table.each do |name,symbol| + hash[name] = symbol.value + end + + return hash + end + + # # Sets the symbol values en-mass using the specified _hash_ of # symbol names and their values. # def symbols=(hash) hash.each do |name,value|