Class: Nexpose::Header
- Inherits:
-
Object
- Object
- Nexpose::Header
- Includes:
- XMLUtils
- Defined in:
- lib/nexpose/creds.rb
Overview
Object that represents Header name-value pairs, associated with Web Session Authentication.
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Name, one per Header.
-
#value ⇒ Object
readonly
Value, one per Header.
Instance Method Summary collapse
- #as_xml ⇒ Object (also: #to_xml_elem)
-
#initialize(name, value) ⇒ Header
constructor
Construct with name value pair.
Methods included from XMLUtils
Constructor Details
#initialize(name, value) ⇒ Header
Construct with name value pair
191 192 193 194 |
# File 'lib/nexpose/creds.rb', line 191 def initialize(name, value) @name = name @value = value end |
Instance Attribute Details
#name ⇒ Object (readonly)
Name, one per Header
186 187 188 |
# File 'lib/nexpose/creds.rb', line 186 def name @name end |
#value ⇒ Object (readonly)
Value, one per Header
188 189 190 |
# File 'lib/nexpose/creds.rb', line 188 def value @value end |
Instance Method Details
#as_xml ⇒ Object Also known as: to_xml_elem
196 197 198 199 200 201 202 |
# File 'lib/nexpose/creds.rb', line 196 def as_xml attributes = {} attributes['name'] = @name attributes['value'] = @value make_xml('Header', attributes) end |