Class: FixtureFox::AnchorToken
Instance Attribute Summary
Attributes inherited from Token
#file, #initial_indent, #lineno, #litt, #pos, #value
Class Method Summary collapse
-
.of_ident(ident) ⇒ Object
Convert an Ident token to a AnchorToken token.
Instance Method Summary collapse
-
#initialize(file, lineno, initial_indent, pos, litt) ⇒ AnchorToken
constructor
A new instance of AnchorToken.
Methods inherited from Token
Constructor Details
#initialize(file, lineno, initial_indent, pos, litt) ⇒ AnchorToken
Returns a new instance of AnchorToken.
24 25 26 27 |
# File 'lib/fixture_fox/token.rb', line 24 def initialize(file, lineno, initial_indent, pos, litt) super @value = litt[1..-1].to_sym end |
Class Method Details
.of_ident(ident) ⇒ Object
Convert an Ident token to a AnchorToken token
30 31 32 |
# File 'lib/fixture_fox/token.rb', line 30 def self.of_ident(ident) AnchorToken.new(ident.file, ident.lineno, ident.initial_indent, ident.pos, "&#{ident.litt}") end |