Class: Nexpose::HostName
- Inherits:
-
Object
- Object
- Nexpose::HostName
- Includes:
- Comparable
- Defined in:
- lib/nexpose/site.rb
Overview
Description
Object that represents a hostname to be added to a site.
Instance Attribute Summary collapse
-
#host ⇒ Object
Named host (usually DNS or Netbios name).
Instance Method Summary collapse
- #<=>(other) ⇒ Object
- #eql?(other) ⇒ Boolean
- #hash ⇒ Object
-
#initialize(hostname) ⇒ HostName
constructor
A new instance of HostName.
- #to_xml ⇒ Object
- #to_xml_elem ⇒ Object
Constructor Details
#initialize(hostname) ⇒ HostName
Returns a new instance of HostName.
758 759 760 |
# File 'lib/nexpose/site.rb', line 758 def initialize(hostname) @host = hostname end |
Instance Attribute Details
#host ⇒ Object
Named host (usually DNS or Netbios name).
756 757 758 |
# File 'lib/nexpose/site.rb', line 756 def host @host end |
Instance Method Details
#<=>(other) ⇒ Object
764 765 766 |
# File 'lib/nexpose/site.rb', line 764 def <=>(other) to_xml <=> other.to_xml end |
#eql?(other) ⇒ Boolean
768 769 770 |
# File 'lib/nexpose/site.rb', line 768 def eql?(other) to_xml == other.to_xml end |
#hash ⇒ Object
772 773 774 |
# File 'lib/nexpose/site.rb', line 772 def hash to_xml.hash end |
#to_xml ⇒ Object
782 783 784 |
# File 'lib/nexpose/site.rb', line 782 def to_xml to_xml_elem.to_s end |
#to_xml_elem ⇒ Object
776 777 778 779 780 |
# File 'lib/nexpose/site.rb', line 776 def to_xml_elem xml = REXML::Element.new('host') xml.text = @host xml end |