Class: Tsumamigui::Parser
- Inherits:
-
Object
- Object
- Tsumamigui::Parser
- Defined in:
- lib/tsumamigui/parser.rb
Instance Attribute Summary collapse
-
#xpath ⇒ Object
readonly
xpath to getting the data from.
Class Method Summary collapse
-
.parse(responses, xpath) ⇒ Array<Hash>
Parsed responses.
Instance Method Summary collapse
-
#initialize(xpath) ⇒ Parser
constructor
A new instance of Parser.
Constructor Details
#initialize(xpath) ⇒ Parser
Returns a new instance of Parser.
19 20 21 |
# File 'lib/tsumamigui/parser.rb', line 19 def initialize(xpath) @xpath = xpath end |
Instance Attribute Details
#xpath ⇒ Object (readonly)
xpath to getting the data from
7 8 9 |
# File 'lib/tsumamigui/parser.rb', line 7 def xpath @xpath end |
Class Method Details
.parse(responses, xpath) ⇒ Array<Hash>
Returns parsed responses.
13 14 15 |
# File 'lib/tsumamigui/parser.rb', line 13 def parse(responses, xpath) new(xpath).send(:parse, responses) end |