Class: IceGrid::PropertyDescriptor

Inherits:
Object
  • Object
show all
Includes:
Ice::Inspect_mixin
Defined in:
lib/IceGrid/Descriptor.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Ice::Inspect_mixin

#inspect

Constructor Details

#initialize(name = '', value = '') ⇒ PropertyDescriptor

Returns a new instance of PropertyDescriptor.



30
31
32
33
# File 'lib/IceGrid/Descriptor.rb', line 30

def initialize(name='', value='')
    @name = name
    @value = value
end

Instance Attribute Details

#nameObject

Returns the value of attribute name.



53
54
55
# File 'lib/IceGrid/Descriptor.rb', line 53

def name
  @name
end

#valueObject

Returns the value of attribute value.



53
54
55
# File 'lib/IceGrid/Descriptor.rb', line 53

def value
  @value
end

Instance Method Details

#==(other) ⇒ Object



42
43
44
45
46
47
# File 'lib/IceGrid/Descriptor.rb', line 42

def ==(other)
    return false if !other.is_a? ::IceGrid::PropertyDescriptor or
        @name != other.name or
        @value != other.value
    true
end

#eql?(other) ⇒ Boolean

Returns:

  • (Boolean)


49
50
51
# File 'lib/IceGrid/Descriptor.rb', line 49

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

#hashObject



35
36
37
38
39
40
# File 'lib/IceGrid/Descriptor.rb', line 35

def hash
    _h = 0
    _h = 5 * _h + @name.hash
    _h = 5 * _h + @value.hash
    _h % 0x7fffffff
end