Class: OfacSdn::Parser
- Inherits:
-
Object
- Object
- OfacSdn::Parser
- Defined in:
- lib/ofac_sdn/parser.rb
Overview
OfacSdn::Parser parses the XML document and returns a formatted hash
Instance Attribute Summary collapse
-
#document ⇒ Object
readonly
Returns the value of attribute document.
-
#result ⇒ Object
readonly
Returns the value of attribute result.
-
#xsd ⇒ Object
readonly
Returns the value of attribute xsd.
Class Method Summary collapse
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(xsd:, document:) ⇒ Parser
constructor
A new instance of Parser.
Constructor Details
#initialize(xsd:, document:) ⇒ Parser
Returns a new instance of Parser.
13 14 15 16 |
# File 'lib/ofac_sdn/parser.rb', line 13 def initialize(xsd:, document:) @xsd = xsd @document = document end |
Instance Attribute Details
#document ⇒ Object (readonly)
Returns the value of attribute document.
11 12 13 |
# File 'lib/ofac_sdn/parser.rb', line 11 def document @document end |
#result ⇒ Object (readonly)
Returns the value of attribute result.
11 12 13 |
# File 'lib/ofac_sdn/parser.rb', line 11 def result @result end |
#xsd ⇒ Object (readonly)
Returns the value of attribute xsd.
11 12 13 |
# File 'lib/ofac_sdn/parser.rb', line 11 def xsd @xsd end |
Class Method Details
.run(**kwargs) ⇒ Object
7 8 9 |
# File 'lib/ofac_sdn/parser.rb', line 7 def self.run(**kwargs) new(**kwargs).call end |
Instance Method Details
#call ⇒ Object
18 19 20 21 22 |
# File 'lib/ofac_sdn/parser.rb', line 18 def call initialize_result_hash build_hash_with('sdnList > sdnEntry') result end |