Class: MarshalParser::Formatters::Symbols::Table
- Inherits:
-
Object
- Object
- MarshalParser::Formatters::Symbols::Table
- Defined in:
- lib/marshal-parser/formatters/symbols/table.rb
Instance Method Summary collapse
-
#initialize(symbols) ⇒ Table
constructor
A new instance of Table.
- #string ⇒ Object
Constructor Details
#initialize(symbols) ⇒ Table
Returns a new instance of Table.
7 8 9 |
# File 'lib/marshal-parser/formatters/symbols/table.rb', line 7 def initialize(symbols) @symbols = symbols end |
Instance Method Details
#string ⇒ Object
11 12 13 14 15 |
# File 'lib/marshal-parser/formatters/symbols/table.rb', line 11 def string @symbols.map.with_index do |symbol, i| "%-4d - :%s" % [i, symbol] end.join("\n") end |