Class: Ice::ConnectionClose
- Inherits:
-
Object
- Object
- Ice::ConnectionClose
- Includes:
- Comparable
- Defined in:
- lib/Ice/Connection.rb
Constant Summary collapse
- Forcefully =
ConnectionClose.new("Forcefully", 0)
- Gracefully =
ConnectionClose.new("Gracefully", 1)
- GracefullyWithWait =
ConnectionClose.new("GracefullyWithWait", 2)
- @@_enumerators =
{0=>Forcefully, 1=>Gracefully, 2=>GracefullyWithWait}
Class Method Summary collapse
Instance Method Summary collapse
- #<=>(other) ⇒ Object
- #hash ⇒ Object
-
#initialize(name, value) ⇒ ConnectionClose
constructor
A new instance of ConnectionClose.
- #to_i ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(name, value) ⇒ ConnectionClose
Returns a new instance of ConnectionClose.
260 261 262 263 |
# File 'lib/Ice/Connection.rb', line 260 def initialize(name, value) @name = name @value = value end |
Class Method Details
._enumerators ⇒ Object
296 297 298 |
# File 'lib/Ice/Connection.rb', line 296 def ConnectionClose._enumerators @@_enumerators end |
.each(&block) ⇒ Object
286 287 288 |
# File 'lib/Ice/Connection.rb', line 286 def ConnectionClose.each(&block) @@_enumerators.each_value(&block) end |
.from_int(val) ⇒ Object
265 266 267 |
# File 'lib/Ice/Connection.rb', line 265 def ConnectionClose.from_int(val) @@_enumerators[val] end |
Instance Method Details
#<=>(other) ⇒ Object
277 278 279 280 |
# File 'lib/Ice/Connection.rb', line 277 def <=>(other) other.is_a?(ConnectionClose) or raise ArgumentError, "value must be a ConnectionClose" @value <=> other.to_i end |
#hash ⇒ Object
282 283 284 |
# File 'lib/Ice/Connection.rb', line 282 def hash @value.hash end |
#to_i ⇒ Object
273 274 275 |
# File 'lib/Ice/Connection.rb', line 273 def to_i @value end |
#to_s ⇒ Object
269 270 271 |
# File 'lib/Ice/Connection.rb', line 269 def to_s @name end |