Class: IceGrid::LoadInfo

Inherits:
Object
  • Object
show all
Defined in:
lib/IceGrid/Admin.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

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

Returns a new instance of LoadInfo.



343
344
345
346
347
# File 'lib/IceGrid/Admin.rb', line 343

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.



373
374
375
# File 'lib/IceGrid/Admin.rb', line 373

def avg1
  @avg1
end

#avg15Object

Returns the value of attribute avg15.



373
374
375
# File 'lib/IceGrid/Admin.rb', line 373

def avg15
  @avg15
end

#avg5Object

Returns the value of attribute avg5.



373
374
375
# File 'lib/IceGrid/Admin.rb', line 373

def avg5
  @avg5
end

Instance Method Details

#==(other) ⇒ Object



357
358
359
360
361
362
363
# File 'lib/IceGrid/Admin.rb', line 357

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)


365
366
367
# File 'lib/IceGrid/Admin.rb', line 365

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

#hashObject



349
350
351
352
353
354
355
# File 'lib/IceGrid/Admin.rb', line 349

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

#inspectObject



369
370
371
# File 'lib/IceGrid/Admin.rb', line 369

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