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



210
211
212
213
# File 'lib/nexpose/creds.rb', line 210

def initialize(name, value)
  @name = name
  @value = value
end

Instance Attribute Details

#nameObject (readonly)

Name, one per Header



205
206
207
# File 'lib/nexpose/creds.rb', line 205

def name
  @name
end

#valueObject (readonly)

Value, one per Header



207
208
209
# File 'lib/nexpose/creds.rb', line 207

def value
  @value
end

Instance Method Details

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