Class: Ice::EncodingVersion
- Inherits:
-
Object
- Object
- Ice::EncodingVersion
- Defined in:
- lib/Ice/Version.rb
Instance Attribute Summary collapse
-
#major ⇒ Object
Returns the value of attribute major.
-
#minor ⇒ Object
Returns the value of attribute minor.
Instance Method Summary collapse
- #==(other) ⇒ Object
- #eql?(other) ⇒ Boolean
- #hash ⇒ Object
-
#initialize(major = 0, minor = 0) ⇒ EncodingVersion
constructor
A new instance of EncodingVersion.
- #inspect ⇒ Object
Constructor Details
#initialize(major = 0, minor = 0) ⇒ EncodingVersion
Returns a new instance of EncodingVersion.
66 67 68 69 |
# File 'lib/Ice/Version.rb', line 66 def initialize(major=0, minor=0) @major = major @minor = minor end |
Instance Attribute Details
#major ⇒ Object
Returns the value of attribute major.
93 94 95 |
# File 'lib/Ice/Version.rb', line 93 def major @major end |
#minor ⇒ Object
Returns the value of attribute minor.
93 94 95 |
# File 'lib/Ice/Version.rb', line 93 def minor @minor end |
Instance Method Details
#==(other) ⇒ Object
78 79 80 81 82 83 |
# File 'lib/Ice/Version.rb', line 78 def ==(other) return false if !other.is_a? ::Ice::EncodingVersion or @major != other.major or @minor != other.minor true end |
#eql?(other) ⇒ Boolean
85 86 87 |
# File 'lib/Ice/Version.rb', line 85 def eql?(other) return other.class == self.class && other == self end |
#hash ⇒ Object
71 72 73 74 75 76 |
# File 'lib/Ice/Version.rb', line 71 def hash _h = 0 _h = 5 * _h + @major.hash _h = 5 * _h + @minor.hash _h % 0x7fffffff end |
#inspect ⇒ Object
89 90 91 |
# File 'lib/Ice/Version.rb', line 89 def inspect ::Ice::__stringify(self, T_EncodingVersion) end |