Class: Relaton::Ecma::DataParser
- Inherits:
-
Object
- Object
- Relaton::Ecma::DataParser
- Includes:
- ParserCommon
- Defined in:
- lib/relaton/ecma/data_parser.rb
Instance Method Summary collapse
-
#initialize(hit, errors = {}) ⇒ DataParser
constructor
Initialize parser.
- #parse ⇒ Array<Relaton::Ecma::ItemData>
Methods included from ParserCommon
#contributor, #default_bib_hash, #fetch_docidentifier, #fetch_doctype, #fetch_ext
Constructor Details
#initialize(hit, errors = {}) ⇒ DataParser
Initialize parser
12 13 14 15 |
# File 'lib/relaton/ecma/data_parser.rb', line 12 def initialize(hit, errors = {}) @hit = hit @errors = errors end |
Instance Method Details
#parse ⇒ Array<Relaton::Ecma::ItemData>
18 19 20 21 22 23 24 |
# File 'lib/relaton/ecma/data_parser.rb', line 18 def parse if @hit[:href] parse_standard else parse_memento end end |