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



140
141
142
143
# File 'lib/nexpose/creds.rb', line 140

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

Instance Attribute Details

#nameObject (readonly)

Name, one per Header



135
136
137
# File 'lib/nexpose/creds.rb', line 135

def name
  @name
end

#valueObject (readonly)

Value, one per Header



137
138
139
# File 'lib/nexpose/creds.rb', line 137

def value
  @value
end

Instance Method Details

#to_xml_elemObject



145
146
147
148
149
150
151
# File 'lib/nexpose/creds.rb', line 145

def to_xml_elem
  attributes = {}
  attributes['name'] = @name
  attributes['value'] = @value

  make_xml('Header', attributes)
end