Class: Astrapi::Identifier
Overview
.….….….….….….…..
Instance Method Summary collapse
- #==(other) ⇒ Object
-
#initialize(tok) ⇒ Identifier
constructor
A new instance of Identifier.
- #str ⇒ Object
- #to_s ⇒ Object
Methods inherited from Ast
Constructor Details
#initialize(tok) ⇒ Identifier
Returns a new instance of Identifier.
51 52 53 |
# File 'lib/ast.rb', line 51 def initialize tok @tok=tok end |
Instance Method Details
#==(other) ⇒ Object
63 64 65 |
# File 'lib/ast.rb', line 63 def ==(other) str==other.str end |
#str ⇒ Object
55 56 57 |
# File 'lib/ast.rb', line 55 def str @tok.val.to_s end |
#to_s ⇒ Object
59 60 61 |
# File 'lib/ast.rb', line 59 def to_s str end |