Class: Nendo::ParsedSymbol
- Inherits:
-
Object
- Object
- Nendo::ParsedSymbol
- Defined in:
- lib/nendo/ruby/types.rb
Instance Attribute Summary collapse
-
#lineno ⇒ Object
readonly
Returns the value of attribute lineno.
-
#sourcefile ⇒ Object
readonly
Returns the value of attribute sourcefile.
Instance Method Summary collapse
- #==(other) ⇒ Object
-
#initialize(sym, sourcefile, lineno) ⇒ ParsedSymbol
constructor
A new instance of ParsedSymbol.
- #intern ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(sym, sourcefile, lineno) ⇒ ParsedSymbol
Returns a new instance of ParsedSymbol.
254 255 256 257 258 |
# File 'lib/nendo/ruby/types.rb', line 254 def initialize( sym, sourcefile, lineno ) @sym = sym @sourcefile = sourcefile @lineno = lineno end |
Instance Attribute Details
#lineno ⇒ Object (readonly)
Returns the value of attribute lineno.
253 254 255 |
# File 'lib/nendo/ruby/types.rb', line 253 def lineno @lineno end |
#sourcefile ⇒ Object (readonly)
Returns the value of attribute sourcefile.
253 254 255 |
# File 'lib/nendo/ruby/types.rb', line 253 def sourcefile @sourcefile end |
Instance Method Details
#==(other) ⇒ Object
268 269 270 271 272 273 |
# File 'lib/nendo/ruby/types.rb', line 268 def ==( other ) if (other.class == Symbol) or (other.class == ParsedSymbol) @sym == other.intern end false end |
#intern ⇒ Object
264 265 266 |
# File 'lib/nendo/ruby/types.rb', line 264 def intern @sym end |
#to_s ⇒ Object
260 261 262 |
# File 'lib/nendo/ruby/types.rb', line 260 def to_s @sym.to_s end |