Class: IceGrid::TemplateDescriptor

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(descriptor = nil, parameters = nil, parameterDefaults = nil) ⇒ TemplateDescriptor

Returns a new instance of TemplateDescriptor.



457
458
459
460
461
# File 'lib/IceGrid/Descriptor.rb', line 457

def initialize(descriptor=nil, parameters=nil, parameterDefaults=nil)
    @descriptor = descriptor
    @parameters = parameters
    @parameterDefaults = parameterDefaults
end

Instance Attribute Details

#descriptorObject

Returns the value of attribute descriptor.



483
484
485
# File 'lib/IceGrid/Descriptor.rb', line 483

def descriptor
  @descriptor
end

#parameterDefaultsObject

Returns the value of attribute parameterDefaults.



483
484
485
# File 'lib/IceGrid/Descriptor.rb', line 483

def parameterDefaults
  @parameterDefaults
end

#parametersObject

Returns the value of attribute parameters.



483
484
485
# File 'lib/IceGrid/Descriptor.rb', line 483

def parameters
  @parameters
end

Instance Method Details

#==(other) ⇒ Object



471
472
473
474
475
476
477
# File 'lib/IceGrid/Descriptor.rb', line 471

def ==(other)
    return false if !other.is_a? ::IceGrid::TemplateDescriptor or
        @descriptor != other.descriptor or
        @parameters != other.parameters or
        @parameterDefaults != other.parameterDefaults
    true
end

#eql?(other) ⇒ Boolean

Returns:

  • (Boolean)


479
480
481
# File 'lib/IceGrid/Descriptor.rb', line 479

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

#hashObject



463
464
465
466
467
468
469
# File 'lib/IceGrid/Descriptor.rb', line 463

def hash
    _h = 0
    _h = 5 * _h + @descriptor.hash
    _h = 5 * _h + @parameters.hash
    _h = 5 * _h + @parameterDefaults.hash
    _h % 0x7fffffff
end