Class: Twostroke::AST::Base
- Inherits:
-
Object
- Object
- Twostroke::AST::Base
- Defined in:
- lib/twostroke/ast.rb
Direct Known Subclasses
Array, Assignment, Body, Break, Call, Case, Continue, Declaration, DoWhile, False, ForIn, ForLoop, Function, If, Index, Label, MemberAccess, MultiExpression, New, Null, Number, ObjectLiteral, Regexp, Return, String, Switch, Ternary, This, Throw, True, Try, Variable, While, With
Instance Attribute Summary collapse
-
#line ⇒ Object
Returns the value of attribute line.
Instance Method Summary collapse
-
#initialize(hash = {}) ⇒ Base
constructor
A new instance of Base.
Constructor Details
#initialize(hash = {}) ⇒ Base
Returns a new instance of Base.
5 6 7 8 9 |
# File 'lib/twostroke/ast.rb', line 5 def initialize(hash = {}) hash.each do |k,v| send "#{k}=", v end end |
Instance Attribute Details
#line ⇒ Object
Returns the value of attribute line.
4 5 6 |
# File 'lib/twostroke/ast.rb', line 4 def line @line end |