Class: Bricolage::JobNet::Location
- Inherits:
-
Object
- Object
- Bricolage::JobNet::Location
- Defined in:
- lib/bricolage/jobnet.rb
Instance Attribute Summary collapse
-
#file ⇒ Object
readonly
Returns the value of attribute file.
-
#lineno ⇒ Object
readonly
Returns the value of attribute lineno.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(file, lineno) ⇒ Location
constructor
A new instance of Location.
- #inspect ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(file, lineno) ⇒ Location
Returns a new instance of Location.
394 395 396 397 |
# File 'lib/bricolage/jobnet.rb', line 394 def initialize(file, lineno) @file = file @lineno = lineno end |
Instance Attribute Details
#file ⇒ Object (readonly)
Returns the value of attribute file.
399 400 401 |
# File 'lib/bricolage/jobnet.rb', line 399 def file @file end |
#lineno ⇒ Object (readonly)
Returns the value of attribute lineno.
400 401 402 |
# File 'lib/bricolage/jobnet.rb', line 400 def lineno @lineno end |
Class Method Details
.dummy ⇒ Object
386 387 388 |
# File 'lib/bricolage/jobnet.rb', line 386 def Location.dummy new('(dummy)', 0) end |
.for_file(f) ⇒ Object
390 391 392 |
# File 'lib/bricolage/jobnet.rb', line 390 def Location.for_file(f) new(f.path, f.lineno) end |
Instance Method Details
#inspect ⇒ Object
402 403 404 |
# File 'lib/bricolage/jobnet.rb', line 402 def inspect "\#<#{self.class} #{to_s}>" end |
#to_s ⇒ Object
406 407 408 |
# File 'lib/bricolage/jobnet.rb', line 406 def to_s "#{@file}:#{@lineno}" end |