Class: IceGrid::RegistryInfo

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Ice::Inspect_mixin

#inspect

Constructor Details

#initialize(name = '', hostname = '') ⇒ RegistryInfo

Returns a new instance of RegistryInfo.



269
270
271
272
# File 'ruby/IceGrid/Admin.rb', line 269

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

Instance Attribute Details

#hostnameObject

Returns the value of attribute hostname.



292
293
294
# File 'ruby/IceGrid/Admin.rb', line 292

def hostname
  @hostname
end

#nameObject

Returns the value of attribute name.



292
293
294
# File 'ruby/IceGrid/Admin.rb', line 292

def name
  @name
end

Instance Method Details

#==(other) ⇒ Object



281
282
283
284
285
286
# File 'ruby/IceGrid/Admin.rb', line 281

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

#eql?(other) ⇒ Boolean

Returns:

  • (Boolean)


288
289
290
# File 'ruby/IceGrid/Admin.rb', line 288

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

#hashObject



274
275
276
277
278
279
# File 'ruby/IceGrid/Admin.rb', line 274

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