Class: Logue::LineMsgObj
- Inherits:
-
Object
- Object
- Logue::LineMsgObj
- Defined in:
- lib/logue/lines/line_msg_obj.rb
Instance Attribute Summary collapse
-
#msg ⇒ Object
readonly
Returns the value of attribute msg.
-
#obj ⇒ Object
readonly
Returns the value of attribute obj.
Instance Method Summary collapse
-
#initialize(msg, obj = nil) ⇒ LineMsgObj
constructor
A new instance of LineMsgObj.
- #message_string ⇒ Object
Constructor Details
#initialize(msg, obj = nil) ⇒ LineMsgObj
6 7 8 9 |
# File 'lib/logue/lines/line_msg_obj.rb', line 6 def initialize msg, obj = nil @msg = msg @obj = obj end |
Instance Attribute Details
#msg ⇒ Object (readonly)
Returns the value of attribute msg.
3 4 5 |
# File 'lib/logue/lines/line_msg_obj.rb', line 3 def msg @msg end |
#obj ⇒ Object (readonly)
Returns the value of attribute obj.
4 5 6 |
# File 'lib/logue/lines/line_msg_obj.rb', line 4 def obj @obj end |
Instance Method Details
#message_string ⇒ Object
11 12 13 14 15 16 17 |
# File 'lib/logue/lines/line_msg_obj.rb', line 11 def if @obj @msg.to_s + ": " + @obj.to_s else @msg.to_s end end |