Class: Pubid::Ieee::PreParser::Result
- Inherits:
-
Struct
- Object
- Struct
- Pubid::Ieee::PreParser::Result
- Defined in:
- lib/pubid/ieee/pre_parser.rb
Overview
Outcome of preprocessing an input string.
dispatch - Symbol naming the construction strategy to use:
:standard - single identifier via parse_single
:aiee_simple - delegate to Aiee::Identifier.parse
:dual_and - split on " and " (top-level, outside parens)
:dual_ampersand - split on " & " (top-level, outside parens)
:dual_semicolon - split on "; "
:dual_space_separated - split at second publisher occurrence
:dual_reaffirmed - (R####) (Revision of ...) collapse + reaffirm
:dual_ire - (R####) (IRE identifier) split
:aiee_asa_adoption - AIEE identifier with (ASA ...) parenthetical
:adopted - parenthetical adoption with foreign identifier
input - the (possibly rewritten) input string to feed downstream. parts - array of pre-split strings for dual/adopted dispatches. metadata - hash of extracted signals (e.g. reaffirmed: “2010”).
Instance Attribute Summary collapse
-
#dispatch ⇒ Object
Returns the value of attribute dispatch.
-
#input ⇒ Object
Returns the value of attribute input.
-
#metadata ⇒ Object
Returns the value of attribute metadata.
-
#parts ⇒ Object
Returns the value of attribute parts.
Instance Method Summary collapse
-
#initialize ⇒ Result
constructor
A new instance of Result.
Constructor Details
#initialize ⇒ Result
Returns a new instance of Result.
30 31 32 33 34 |
# File 'lib/pubid/ieee/pre_parser.rb', line 30 def initialize(*) super self.parts ||= [] self. ||= {} end |
Instance Attribute Details
#dispatch ⇒ Object
Returns the value of attribute dispatch
28 29 30 |
# File 'lib/pubid/ieee/pre_parser.rb', line 28 def dispatch @dispatch end |
#input ⇒ Object
Returns the value of attribute input
28 29 30 |
# File 'lib/pubid/ieee/pre_parser.rb', line 28 def input @input end |
#metadata ⇒ Object
Returns the value of attribute metadata
28 29 30 |
# File 'lib/pubid/ieee/pre_parser.rb', line 28 def @metadata end |
#parts ⇒ Object
Returns the value of attribute parts
28 29 30 |
# File 'lib/pubid/ieee/pre_parser.rb', line 28 def parts @parts end |