Class: IceGrid::LoadInfo

Inherits:
Object
  • Object
show all
Includes:
Ice::Inspect_mixin
Defined in:
ruby/IceGrid/Admin.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Ice::Inspect_mixin

#inspect

Constructor Details

#initialize(avg1 = 0.0, avg5 = 0.0, avg15 = 0.0) ⇒ LoadInfo

Returns a new instance of LoadInfo.



307
308
309
310
311
# File 'ruby/IceGrid/Admin.rb', line 307

def initialize(avg1=0.0, avg5=0.0, avg15=0.0)
    @avg1 = avg1
    @avg5 = avg5
    @avg15 = avg15
end

Instance Attribute Details

#avg1Object

Returns the value of attribute avg1.



333
334
335
# File 'ruby/IceGrid/Admin.rb', line 333

def avg1
  @avg1
end

#avg15Object

Returns the value of attribute avg15.



333
334
335
# File 'ruby/IceGrid/Admin.rb', line 333

def avg15
  @avg15
end

#avg5Object

Returns the value of attribute avg5.



333
334
335
# File 'ruby/IceGrid/Admin.rb', line 333

def avg5
  @avg5
end

Instance Method Details

#==(other) ⇒ Object



321
322
323
324
325
326
327
# File 'ruby/IceGrid/Admin.rb', line 321

def ==(other)
    return false if !other.is_a? ::IceGrid::LoadInfo or
        @avg1 != other.avg1 or
        @avg5 != other.avg5 or
        @avg15 != other.avg15
    true
end

#eql?(other) ⇒ Boolean

Returns:

  • (Boolean)


329
330
331
# File 'ruby/IceGrid/Admin.rb', line 329

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

#hashObject



313
314
315
316
317
318
319
# File 'ruby/IceGrid/Admin.rb', line 313

def hash
    _h = 0
    _h = 5 * _h + @avg1.hash
    _h = 5 * _h + @avg5.hash
    _h = 5 * _h + @avg15.hash
    _h % 0x7fffffff
end