Class: Registrar::NameServer

Inherits:
Object
  • Object
show all
Includes:
Comparable
Defined in:
lib/registrar/name_server.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name) ⇒ NameServer

Returns a new instance of NameServer.



8
9
10
# File 'lib/registrar/name_server.rb', line 8

def initialize(name)
  @name = name
end

Instance Attribute Details

#ip_addressObject

Returns the value of attribute ip_address.



6
7
8
# File 'lib/registrar/name_server.rb', line 6

def ip_address
  @ip_address
end

#nameObject (readonly)

Returns the value of attribute name.



5
6
7
# File 'lib/registrar/name_server.rb', line 5

def name
  @name
end

Instance Method Details

#<=>(other) ⇒ Object



12
13
14
# File 'lib/registrar/name_server.rb', line 12

def <=> other
  self.name <=> other.name
end