Class: Ice::EncodingVersion
- Inherits:
-
Object
- Object
- Ice::EncodingVersion
- Includes:
- Inspect_mixin
- 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.
Methods included from Inspect_mixin
Constructor Details
#initialize(major = 0, minor = 0) ⇒ EncodingVersion
Returns a new instance of EncodingVersion.
59 60 61 62 |
# File 'lib/Ice/Version.rb', line 59 def initialize(major=0, minor=0) @major = major @minor = minor end |
Instance Attribute Details
#major ⇒ Object
Returns the value of attribute major.
82 83 84 |
# File 'lib/Ice/Version.rb', line 82 def major @major end |
#minor ⇒ Object
Returns the value of attribute minor.
82 83 84 |
# File 'lib/Ice/Version.rb', line 82 def minor @minor end |
Instance Method Details
#==(other) ⇒ Object
71 72 73 74 75 76 |
# File 'lib/Ice/Version.rb', line 71 def ==(other) return false if !other.is_a? ::Ice::EncodingVersion or @major != other.major or @minor != other.minor true end |
#eql?(other) ⇒ Boolean
78 79 80 |
# File 'lib/Ice/Version.rb', line 78 def eql?(other) return other.class == self.class && other == self end |
#hash ⇒ Object
64 65 66 67 68 69 |
# File 'lib/Ice/Version.rb', line 64 def hash _h = 0 _h = 5 * _h + @major.hash _h = 5 * _h + @minor.hash _h % 0x7fffffff end |