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
210 211 212 213 |
# File 'lib/nexpose/creds.rb', line 210 def initialize(name, value) @name = name @value = value end |
Instance Attribute Details
#name ⇒ Object (readonly)
Name, one per Header
205 206 207 |
# File 'lib/nexpose/creds.rb', line 205 def name @name end |
#value ⇒ Object (readonly)
Value, one per Header
207 208 209 |
# File 'lib/nexpose/creds.rb', line 207 def value @value end |
Instance Method Details
#as_xml ⇒ Object Also known as: to_xml_elem
215 216 217 218 219 220 221 |
# File 'lib/nexpose/creds.rb', line 215 def as_xml attributes = {} attributes['name'] = @name attributes['value'] = @value make_xml('Header', attributes) end |