Class: Logue::Frame
- Inherits:
-
Object
- Object
- Logue::Frame
- Defined in:
- lib/logue/locations/frame.rb
Constant Summary collapse
- FRAME_RE =
Regexp.new '(.*):(\d+)(?::in \`(.*)\')?'
Instance Attribute Summary collapse
-
#line ⇒ Object
readonly
Returns the value of attribute line.
-
#method ⇒ Object
readonly
Returns the value of attribute method.
-
#path ⇒ Object
readonly
Returns the value of attribute path.
Instance Method Summary collapse
-
#initialize(entry: nil, path: nil, line: nil, method: nil) ⇒ Frame
constructor
A new instance of Frame.
- #to_s ⇒ Object
Constructor Details
#initialize(entry: nil, path: nil, line: nil, method: nil) ⇒ Frame
Returns a new instance of Frame.
9 10 11 12 13 |
# File 'lib/logue/locations/frame.rb', line 9 def initialize entry: nil, path: nil, line: nil, method: nil @path = path @line = line @method = method end |
Instance Attribute Details
#line ⇒ Object (readonly)
Returns the value of attribute line.
7 8 9 |
# File 'lib/logue/locations/frame.rb', line 7 def line @line end |
#method ⇒ Object (readonly)
Returns the value of attribute method.
7 8 9 |
# File 'lib/logue/locations/frame.rb', line 7 def method @method end |
#path ⇒ Object (readonly)
Returns the value of attribute path.
7 8 9 |
# File 'lib/logue/locations/frame.rb', line 7 def path @path end |
Instance Method Details
#to_s ⇒ Object
15 16 17 |
# File 'lib/logue/locations/frame.rb', line 15 def to_s [:path, :line, :method].collect { |field| "#{field}: " + send(field).to_s }.join ", " end |