Class: Relaton::Plateau::Parser
- Inherits:
-
Object
- Object
- Relaton::Plateau::Parser
- Defined in:
- lib/relaton/plateau/parser.rb
Direct Known Subclasses
Constant Summary collapse
- ATTRIS =
i[docid title abstract cover edition type doctype subdoctype date link contributor filesize keyword structuredidentifier].freeze
Instance Method Summary collapse
-
#initialize(item) ⇒ Parser
constructor
A new instance of Parser.
- #parse ⇒ Object
Constructor Details
#initialize(item) ⇒ Parser
Returns a new instance of Parser.
7 8 9 |
# File 'lib/relaton/plateau/parser.rb', line 7 def initialize(item) @item = item end |
Instance Method Details
#parse ⇒ Object
11 12 13 14 15 16 |
# File 'lib/relaton/plateau/parser.rb', line 11 def parse args = ATTRIS.each_with_object({}) do |attr, hash| hash[attr] = send("parse_#{attr}") end BibItem.new(**args) end |