Class: Nexpose::Header

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

Methods included from XMLUtils

#make_xml, #parse_xml

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

#nameObject (readonly)

Name, one per Header



186
187
188
# File 'lib/nexpose/creds.rb', line 186

def name
  @name
end

#valueObject (readonly)

Value, one per Header



188
189
190
# File 'lib/nexpose/creds.rb', line 188

def value
  @value
end

Instance Method Details

#as_xmlObject 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