Class: MarshalParser::Formatters::AST::OnlyTokens
- Inherits:
-
Object
- Object
- MarshalParser::Formatters::AST::OnlyTokens
- Defined in:
- lib/marshal-parser/formatters/ast/only_tokens.rb
Instance Method Summary collapse
-
#initialize(node, source_string, renderer) ⇒ OnlyTokens
constructor
A new instance of OnlyTokens.
- #string ⇒ Object
Constructor Details
#initialize(node, source_string, renderer) ⇒ OnlyTokens
Returns a new instance of OnlyTokens.
7 8 9 10 11 |
# File 'lib/marshal-parser/formatters/ast/only_tokens.rb', line 7 def initialize(node, source_string, renderer) @node = node @source_string = source_string @renderer = renderer end |
Instance Method Details
#string ⇒ Object
13 14 15 16 17 |
# File 'lib/marshal-parser/formatters/ast/only_tokens.rb', line 13 def string entries = node_to_entries(@node) block = Renderers::EntriesBlock.new(entries) @renderer.render(block) end |