Class: IceGrid::RegistryInfo

Inherits:
Object
  • Object
show all
Includes:
Ice::Inspect_mixin
Defined in:
lib/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.



281
282
283
284
# File 'lib/IceGrid/Admin.rb', line 281

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

Instance Attribute Details

#hostnameObject

Returns the value of attribute hostname.



304
305
306
# File 'lib/IceGrid/Admin.rb', line 304

def hostname
  @hostname
end

#nameObject

Returns the value of attribute name.



304
305
306
# File 'lib/IceGrid/Admin.rb', line 304

def name
  @name
end

Instance Method Details

#==(other) ⇒ Object



293
294
295
296
297
298
# File 'lib/IceGrid/Admin.rb', line 293

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)


300
301
302
# File 'lib/IceGrid/Admin.rb', line 300

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

#hashObject



286
287
288
289
290
291
# File 'lib/IceGrid/Admin.rb', line 286

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