Class: IceGrid::LoadInfo
- Inherits:
-
Object
- Object
- IceGrid::LoadInfo
- Includes:
- Ice::Inspect_mixin
- Defined in:
- ruby/IceGrid/Admin.rb
Instance Attribute Summary collapse
-
#avg1 ⇒ Object
Returns the value of attribute avg1.
-
#avg15 ⇒ Object
Returns the value of attribute avg15.
-
#avg5 ⇒ Object
Returns the value of attribute avg5.
Instance Method Summary collapse
- #==(other) ⇒ Object
- #eql?(other) ⇒ Boolean
- #hash ⇒ Object
-
#initialize(avg1 = 0.0, avg5 = 0.0, avg15 = 0.0) ⇒ LoadInfo
constructor
A new instance of LoadInfo.
Methods included from Ice::Inspect_mixin
Constructor Details
#initialize(avg1 = 0.0, avg5 = 0.0, avg15 = 0.0) ⇒ LoadInfo
Returns a new instance of LoadInfo.
308 309 310 311 312 |
# File 'ruby/IceGrid/Admin.rb', line 308 def initialize(avg1=0.0, avg5=0.0, avg15=0.0) @avg1 = avg1 @avg5 = avg5 @avg15 = avg15 end |
Instance Attribute Details
#avg1 ⇒ Object
Returns the value of attribute avg1.
334 335 336 |
# File 'ruby/IceGrid/Admin.rb', line 334 def avg1 @avg1 end |
#avg15 ⇒ Object
Returns the value of attribute avg15.
334 335 336 |
# File 'ruby/IceGrid/Admin.rb', line 334 def avg15 @avg15 end |
#avg5 ⇒ Object
Returns the value of attribute avg5.
334 335 336 |
# File 'ruby/IceGrid/Admin.rb', line 334 def avg5 @avg5 end |
Instance Method Details
#==(other) ⇒ Object
322 323 324 325 326 327 328 |
# File 'ruby/IceGrid/Admin.rb', line 322 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
330 331 332 |
# File 'ruby/IceGrid/Admin.rb', line 330 def eql?(other) return other.class == self.class && other == self end |
#hash ⇒ Object
314 315 316 317 318 319 320 |
# File 'ruby/IceGrid/Admin.rb', line 314 def hash _h = 0 _h = 5 * _h + @avg1.hash _h = 5 * _h + @avg5.hash _h = 5 * _h + @avg15.hash _h % 0x7fffffff end |