Class: Logue::Line
- Inherits:
-
Object
- Object
- Logue::Line
- Defined in:
- lib/logue/line.rb
Instance Attribute Summary collapse
-
#block ⇒ Object
readonly
Returns the value of attribute block.
-
#location ⇒ Object
readonly
Returns the value of attribute location.
-
#msg ⇒ Object
readonly
Returns the value of attribute msg.
-
#obj ⇒ Object
readonly
Returns the value of attribute obj.
Instance Method Summary collapse
- #format(locformat) ⇒ Object
-
#initialize(location, msg, obj = nil, &blk) ⇒ Line
constructor
A new instance of Line.
- #location_string(locformat) ⇒ Object
- #message_string ⇒ Object
Constructor Details
#initialize(location, msg, obj = nil, &blk) ⇒ Line
Returns a new instance of Line.
15 16 17 18 19 20 |
# File 'lib/logue/line.rb', line 15 def initialize location, msg, obj = nil, &blk @location = location @msg = msg @obj = obj @block = blk end |
Instance Attribute Details
#block ⇒ Object (readonly)
Returns the value of attribute block.
13 14 15 |
# File 'lib/logue/line.rb', line 13 def block @block end |
#location ⇒ Object (readonly)
Returns the value of attribute location.
10 11 12 |
# File 'lib/logue/line.rb', line 10 def location @location end |
#msg ⇒ Object (readonly)
Returns the value of attribute msg.
11 12 13 |
# File 'lib/logue/line.rb', line 11 def msg @msg end |
#obj ⇒ Object (readonly)
Returns the value of attribute obj.
12 13 14 |
# File 'lib/logue/line.rb', line 12 def obj @obj end |
Instance Method Details
#format(locformat) ⇒ Object
40 41 42 |
# File 'lib/logue/line.rb', line 40 def format locformat location_string(locformat) + " " + end |
#location_string(locformat) ⇒ Object
22 23 24 |
# File 'lib/logue/line.rb', line 22 def location_string locformat @location.format locformat end |