Class: Melbourne::AST::Node
- Inherits:
-
Object
- Object
- Melbourne::AST::Node
- Defined in:
- lib/melbourne/ast/node.rb
Direct Known Subclasses
ActualArguments, Alias, And, ArrayLiteral, BackRef, Begin, Block, BlockArgument, BlockPass, Break, Case, Class, ClassName, ClosedScope, ConcatArgs, ConstAccess, ConstAtTop, ConstFind, ConstName, ConstSet, DefaultArguments, DefineSingleton, Defined, EmptyArray, EmptyBody, EmptySplat, EndData, Ensure, False, File, Flip2, Flip3, Float, FormalArguments, HashLiteral, If, Iter, IterArguments, MAsgn, Match, Match2, Match3, Module, ModuleName, Negate, Nil, Not, NthRef, NumberLiteral, OpAssign1, OpAssign2, OpAssignAnd, PushArgs, Range, RegexLiteral, Rescue, RescueCondition, RescueSplat, Return, SClass, SValue, Self, Send, SplatAssignment, SplatValue, SplatWhen, StringLiteral, SymbolLiteral, ToArray, ToString, TopLevel, True, Undef, VariableAccess, VariableAssignment, When, While
Instance Attribute Summary collapse
-
#line ⇒ Object
Returns the value of attribute line.
Instance Method Summary collapse
- #ascii_graph ⇒ Object
-
#initialize(line) ⇒ Node
constructor
A new instance of Node.
Constructor Details
#initialize(line) ⇒ Node
9 10 11 |
# File 'lib/melbourne/ast/node.rb', line 9 def initialize(line) @line = line end |
Instance Attribute Details
#line ⇒ Object
Returns the value of attribute line.
7 8 9 |
# File 'lib/melbourne/ast/node.rb', line 7 def line @line end |
Instance Method Details
#ascii_graph ⇒ Object
13 14 15 |
# File 'lib/melbourne/ast/node.rb', line 13 def ascii_graph AsciiGrapher.new(self).print end |