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