Class: Ice::ProtocolVersion
- Inherits:
-
Object
- Object
- Ice::ProtocolVersion
- 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) ⇒ ProtocolVersion
constructor
A new instance of ProtocolVersion.
- #inspect ⇒ Object
Constructor Details
#initialize(major = 0, minor = 0) ⇒ ProtocolVersion
Returns a new instance of ProtocolVersion.
28 29 30 31 |
# File 'lib/Ice/Version.rb', line 28 def initialize(major=0, minor=0) @major = major @minor = minor end |
Instance Attribute Details
#major ⇒ Object
Returns the value of attribute major.
55 56 57 |
# File 'lib/Ice/Version.rb', line 55 def major @major end |
#minor ⇒ Object
Returns the value of attribute minor.
55 56 57 |
# File 'lib/Ice/Version.rb', line 55 def minor @minor end |
Instance Method Details
#==(other) ⇒ Object
40 41 42 43 44 45 |
# File 'lib/Ice/Version.rb', line 40 def ==(other) return false if !other.is_a? ::Ice::ProtocolVersion or @major != other.major or @minor != other.minor true end |
#eql?(other) ⇒ Boolean
47 48 49 |
# File 'lib/Ice/Version.rb', line 47 def eql?(other) return other.class == self.class && other == self end |
#hash ⇒ Object
33 34 35 36 37 38 |
# File 'lib/Ice/Version.rb', line 33 def hash _h = 0 _h = 5 * _h + @major.hash _h = 5 * _h + @minor.hash _h % 0x7fffffff end |
#inspect ⇒ Object
51 52 53 |
# File 'lib/Ice/Version.rb', line 51 def inspect ::Ice::__stringify(self, T_ProtocolVersion) end |