Class: IceGrid::PropertyDescriptor

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

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

Returns a new instance of PropertyDescriptor.



34
35
36
37
# File 'lib/IceGrid/Descriptor.rb', line 34

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

Instance Attribute Details

#nameObject

Returns the value of attribute name.



61
62
63
# File 'lib/IceGrid/Descriptor.rb', line 61

def name
  @name
end

#valueObject

Returns the value of attribute value.



61
62
63
# File 'lib/IceGrid/Descriptor.rb', line 61

def value
  @value
end

Instance Method Details

#==(other) ⇒ Object



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

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)


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

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

#hashObject



39
40
41
42
43
44
# File 'lib/IceGrid/Descriptor.rb', line 39

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

#inspectObject



57
58
59
# File 'lib/IceGrid/Descriptor.rb', line 57

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