Class: Rum::FileLocation
- Inherits:
-
Object
- Object
- Rum::FileLocation
- Defined in:
- lib/rum/dsl.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(file, line) ⇒ FileLocation
constructor
A new instance of FileLocation.
- #visit ⇒ Object
Constructor Details
#initialize(file, line) ⇒ FileLocation
Returns a new instance of FileLocation.
17 18 19 20 |
# File 'lib/rum/dsl.rb', line 17 def initialize(file, line) @file = file @line = line end |
Class Method Details
.from_stack_frame(frame) ⇒ Object
22 23 24 25 26 27 28 |
# File 'lib/rum/dsl.rb', line 22 def self.from_stack_frame(frame) file, line = Rum.parse_stack_frame(frame) if file file = File.(file) if File.dirname(file) == '.' new(file, line) end end |