Class: Nexpose::HostName

Inherits:
Object
  • Object
show all
Includes:
Sanitize
Defined in:
lib/nexpose.rb

Overview

Description

Object that represents a hostname to be added to a site.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Sanitize

#replace_entities

Constructor Details

#initialize(hostname) ⇒ HostName

Returns a new instance of HostName.



1011
1012
1013
# File 'lib/nexpose.rb', line 1011

def initialize(hostname)
	@hostname = hostname
end

Instance Attribute Details

#hostnameObject (readonly)

The hostname



1009
1010
1011
# File 'lib/nexpose.rb', line 1009

def hostname
  @hostname
end

Instance Method Details

#to_xmlObject



1016
1017
1018
# File 'lib/nexpose.rb', line 1016

def to_xml
	"<hostname>#{replace_entities(hostname)}</hostname>"
end