Class: IceMX::MetricsFailures

Inherits:
Object
  • Object
show all
Includes:
Ice::Inspect_mixin
Defined in:
lib/Ice/Metrics.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Ice::Inspect_mixin

#inspect

Constructor Details

#initialize(id = '', failures = nil) ⇒ MetricsFailures

Returns a new instance of MetricsFailures.



59
60
61
62
# File 'lib/Ice/Metrics.rb', line 59

def initialize(id='', failures=nil)
    @id = id
    @failures = failures
end

Instance Attribute Details

#failuresObject

Returns the value of attribute failures.



82
83
84
# File 'lib/Ice/Metrics.rb', line 82

def failures
  @failures
end

#idObject

Returns the value of attribute id.



82
83
84
# File 'lib/Ice/Metrics.rb', line 82

def id
  @id
end

Instance Method Details

#==(other) ⇒ Object



71
72
73
74
75
76
# File 'lib/Ice/Metrics.rb', line 71

def ==(other)
    return false if !other.is_a? ::IceMX::MetricsFailures or
        @id != other.id or
        @failures != other.failures
    true
end

#eql?(other) ⇒ Boolean

Returns:

  • (Boolean)


78
79
80
# File 'lib/Ice/Metrics.rb', line 78

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

#hashObject



64
65
66
67
68
69
# File 'lib/Ice/Metrics.rb', line 64

def hash
    _h = 0
    _h = 5 * _h + @id.hash
    _h = 5 * _h + @failures.hash
    _h % 0x7fffffff
end