Class: Ice::EndpointSelectionType
- Inherits:
-
Object
- Object
- Ice::EndpointSelectionType
- Includes:
- Comparable
- Defined in:
- ruby/Ice/EndpointSelectionType.rb
Constant Summary collapse
- Random =
EndpointSelectionType.new("Random", 0)
- Ordered =
EndpointSelectionType.new("Ordered", 1)
- @@_enumerators =
{0=>Random, 1=>Ordered}
Class Method Summary collapse
Instance Method Summary collapse
- #<=>(other) ⇒ Object
- #hash ⇒ Object
-
#initialize(name, value) ⇒ EndpointSelectionType
constructor
A new instance of EndpointSelectionType.
- #to_i ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(name, value) ⇒ EndpointSelectionType
Returns a new instance of EndpointSelectionType.
8 9 10 11 |
# File 'ruby/Ice/EndpointSelectionType.rb', line 8 def initialize(name, value) @name = name @value = value end |
Class Method Details
._enumerators ⇒ Object
42 43 44 |
# File 'ruby/Ice/EndpointSelectionType.rb', line 42 def self._enumerators @@_enumerators end |
.each(&block) ⇒ Object
33 34 35 |
# File 'ruby/Ice/EndpointSelectionType.rb', line 33 def self.each(&block) @@_enumerators.each_value(&block) end |
.from_int(val) ⇒ Object
13 14 15 |
# File 'ruby/Ice/EndpointSelectionType.rb', line 13 def self.from_int(val) @@_enumerators[val] end |
Instance Method Details
#<=>(other) ⇒ Object
25 26 27 |
# File 'ruby/Ice/EndpointSelectionType.rb', line 25 def <=>(other) @value <=> other.to_i if other.is_a?(EndpointSelectionType) end |
#hash ⇒ Object
29 30 31 |
# File 'ruby/Ice/EndpointSelectionType.rb', line 29 def hash @value.hash end |
#to_i ⇒ Object
21 22 23 |
# File 'ruby/Ice/EndpointSelectionType.rb', line 21 def to_i @value end |
#to_s ⇒ Object
17 18 19 |
# File 'ruby/Ice/EndpointSelectionType.rb', line 17 def to_s @name end |