Class: SamlTool::Reader
- Inherits:
-
Object
- Object
- SamlTool::Reader
- Defined in:
- lib/saml_tool/reader.rb
Direct Known Subclasses
Defined Under Namespace
Classes: Content
Instance Attribute Summary collapse
-
#config ⇒ Object
readonly
Returns the value of attribute config.
-
#namespaces ⇒ Object
readonly
Returns the value of attribute namespaces.
-
#saml ⇒ Object
readonly
Returns the value of attribute saml.
Instance Method Summary collapse
-
#initialize(saml, config = {}, namespaces = nil) ⇒ Reader
constructor
A new instance of Reader.
- #to_hash ⇒ Object
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
#config ⇒ Object (readonly)
Returns the value of attribute config.
12 13 14 |
# File 'lib/saml_tool/reader.rb', line 12 def config @config end |
#namespaces ⇒ Object (readonly)
Returns the value of attribute namespaces.
12 13 14 |
# File 'lib/saml_tool/reader.rb', line 12 def namespaces @namespaces end |
#saml ⇒ Object (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_hash ⇒ Object
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 |