Class: Pubid::Ieee::PreParser::Result

Inherits:
Struct
  • Object
show all
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

Instance Method Summary collapse

Constructor Details

#initializeResult

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

#dispatchObject

Returns the value of attribute dispatch

Returns:

  • (Object)

    the current value of dispatch



28
29
30
# File 'lib/pubid/ieee/pre_parser.rb', line 28

def dispatch
  @dispatch
end

#inputObject

Returns the value of attribute input

Returns:

  • (Object)

    the current value of input



28
29
30
# File 'lib/pubid/ieee/pre_parser.rb', line 28

def input
  @input
end

#metadataObject

Returns the value of attribute metadata

Returns:

  • (Object)

    the current value of metadata



28
29
30
# File 'lib/pubid/ieee/pre_parser.rb', line 28

def 
  @metadata
end

#partsObject

Returns the value of attribute parts

Returns:

  • (Object)

    the current value of parts



28
29
30
# File 'lib/pubid/ieee/pre_parser.rb', line 28

def parts
  @parts
end