Class: Ice::EncodingVersion

Inherits:
Object
  • Object
show all
Defined in:
lib/Ice/Version.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#majorObject

Returns the value of attribute major.



93
94
95
# File 'lib/Ice/Version.rb', line 93

def major
  @major
end

#minorObject

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

Returns:

  • (Boolean)


85
86
87
# File 'lib/Ice/Version.rb', line 85

def eql?(other)
    return other.class == self.class && other == self
end

#hashObject



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

#inspectObject



89
90
91
# File 'lib/Ice/Version.rb', line 89

def inspect
    ::Ice::__stringify(self, T_EncodingVersion)
end