Class: Ice::EncodingVersion

Inherits:
Object
  • Object
show all
Includes:
Inspect_mixin
Defined in:
ruby/Ice/Version.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Inspect_mixin

#inspect

Constructor Details

#initialize(major = 0, minor = 0) ⇒ EncodingVersion

Returns a new instance of EncodingVersion.



47
48
49
50
# File 'ruby/Ice/Version.rb', line 47

def initialize(major=0, minor=0)
    @major = major
    @minor = minor
end

Instance Attribute Details

#majorObject

Returns the value of attribute major.



70
71
72
# File 'ruby/Ice/Version.rb', line 70

def major
  @major
end

#minorObject

Returns the value of attribute minor.



70
71
72
# File 'ruby/Ice/Version.rb', line 70

def minor
  @minor
end

Instance Method Details

#==(other) ⇒ Object



59
60
61
62
63
64
# File 'ruby/Ice/Version.rb', line 59

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)


66
67
68
# File 'ruby/Ice/Version.rb', line 66

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

#hashObject



52
53
54
55
56
57
# File 'ruby/Ice/Version.rb', line 52

def hash
    _h = 0
    _h = 5 * _h + @major.hash
    _h = 5 * _h + @minor.hash
    _h % 0x7fffffff
end