Class: SamlTool::Reader

Inherits:
Object
  • Object
show all
Defined in:
lib/saml_tool/reader.rb

Direct Known Subclasses

ResponseReader

Defined Under Namespace

Classes: Content

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(saml, config = {}, namespaces = nil) ⇒ Reader

Returns a new instance of Reader.



14
15
16
17
18
19
# File 'lib/saml_tool/reader.rb', line 14

def initialize(saml, config = {}, namespaces = nil)
  @saml = SamlTool::SAML(saml)
  @config = Hashie::Mash.new(config)
  @namespaces = namespaces
  build_methods
end

Instance Attribute Details

#configObject (readonly)

Returns the value of attribute config.



12
13
14
# File 'lib/saml_tool/reader.rb', line 12

def config
  @config
end

#namespacesObject (readonly)

Returns the value of attribute namespaces.



12
13
14
# File 'lib/saml_tool/reader.rb', line 12

def namespaces
  @namespaces
end

#samlObject (readonly)

Returns the value of attribute saml.



12
13
14
# File 'lib/saml_tool/reader.rb', line 12

def saml
  @saml
end

Instance Method Details

#to_hashObject



21
22
23
# File 'lib/saml_tool/reader.rb', line 21

def to_hash
  config.keys.inject({}){|hash, key| hash[key.to_sym] = send(key.to_sym); hash}
end