Class: Ice::LogMessage

Inherits:
Object
  • Object
show all
Defined in:
lib/Ice/RemoteLogger.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(type = ::Ice::LogMessageType::PrintMessage, timestamp = 0, traceCategory = '', message = '') ⇒ LogMessage

Returns a new instance of LogMessage.



88
89
90
91
92
93
# File 'lib/Ice/RemoteLogger.rb', line 88

def initialize(type=::Ice::LogMessageType::PrintMessage, timestamp=0, traceCategory='', message='')
    @type = type
    @timestamp = timestamp
    @traceCategory = traceCategory
    @message = message
end

Instance Attribute Details

#messageObject

Returns the value of attribute message.



121
122
123
# File 'lib/Ice/RemoteLogger.rb', line 121

def message
  @message
end

#timestampObject

Returns the value of attribute timestamp.



121
122
123
# File 'lib/Ice/RemoteLogger.rb', line 121

def timestamp
  @timestamp
end

#traceCategoryObject

Returns the value of attribute traceCategory.



121
122
123
# File 'lib/Ice/RemoteLogger.rb', line 121

def traceCategory
  @traceCategory
end

#typeObject

Returns the value of attribute type.



121
122
123
# File 'lib/Ice/RemoteLogger.rb', line 121

def type
  @type
end

Instance Method Details

#==(other) ⇒ Object



104
105
106
107
108
109
110
111
# File 'lib/Ice/RemoteLogger.rb', line 104

def ==(other)
    return false if !other.is_a? ::Ice::LogMessage or
        @type != other.type or
        @timestamp != other.timestamp or
        @traceCategory != other.traceCategory or
        @message != other.message
    true
end

#eql?(other) ⇒ Boolean

Returns:

  • (Boolean)


113
114
115
# File 'lib/Ice/RemoteLogger.rb', line 113

def eql?(other)
    return other.class == self.class && other == self
end

#hashObject



95
96
97
98
99
100
101
102
# File 'lib/Ice/RemoteLogger.rb', line 95

def hash
    _h = 0
    _h = 5 * _h + @type.hash
    _h = 5 * _h + @timestamp.hash
    _h = 5 * _h + @traceCategory.hash
    _h = 5 * _h + @message.hash
    _h % 0x7fffffff
end

#inspectObject



117
118
119
# File 'lib/Ice/RemoteLogger.rb', line 117

def inspect
    ::Ice::__stringify(self, T_LogMessage)
end