Class: Nendo::ParsedSymbol

Inherits:
Object
  • Object
show all
Defined in:
lib/nendo/ruby/types.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#linenoObject (readonly)

Returns the value of attribute lineno.



253
254
255
# File 'lib/nendo/ruby/types.rb', line 253

def lineno
  @lineno
end

#sourcefileObject (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

#internObject



264
265
266
# File 'lib/nendo/ruby/types.rb', line 264

def intern
  @sym
end

#to_sObject



260
261
262
# File 'lib/nendo/ruby/types.rb', line 260

def to_s
  @sym.to_s
end