Class: Logue::LineMsgObj

Inherits:
Object
  • Object
show all
Defined in:
lib/logue/lines/line_msg_obj.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#msgObject (readonly)

Returns the value of attribute msg.



3
4
5
# File 'lib/logue/lines/line_msg_obj.rb', line 3

def msg
  @msg
end

#objObject (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_stringObject



11
12
13
14
15
16
17
# File 'lib/logue/lines/line_msg_obj.rb', line 11

def message_string
  if @obj
    @msg.to_s + ": " + @obj.to_s
  else
    @msg.to_s
  end
end