Class: Iev::SourceParser
- Inherits:
-
Object
- Object
- Iev::SourceParser
- Defined in:
- lib/iev/source_parser.rb
Overview
Parses information from the spreadsheet’s SOURCE column.
Constant Summary
Constants included from Utilities
Utilities::FIGURE_ONE_REGEX, Utilities::FIGURE_TWO_REGEX, Utilities::IMAGE_PATH_PREFIX, Utilities::SIMG_PATH_REGEX
Instance Attribute Summary collapse
-
#parsed_sources ⇒ Object
readonly
Returns the value of attribute parsed_sources.
-
#raw_str ⇒ Object
readonly
Returns the value of attribute raw_str.
-
#src_split ⇒ Object
readonly
Returns the value of attribute src_split.
-
#src_str ⇒ Object
readonly
Returns the value of attribute src_str.
Instance Method Summary collapse
-
#initialize(source_str, term_domain) ⇒ SourceParser
constructor
A new instance of SourceParser.
Methods included from Utilities
#parse_anchor_tag, #replace_newlines
Methods included from Cli::Ui
debug, info, progress, set_ui_tag, warn
Constructor Details
#initialize(source_str, term_domain) ⇒ SourceParser
Returns a new instance of SourceParser.
21 22 23 24 25 26 |
# File 'lib/iev/source_parser.rb', line 21 def initialize(source_str, term_domain) @raw_str = source_str.dup.freeze @src_str = raw_str.decode_html.sanitize.freeze @term_domain = term_domain parse end |
Instance Attribute Details
#parsed_sources ⇒ Object (readonly)
Returns the value of attribute parsed_sources.
19 20 21 |
# File 'lib/iev/source_parser.rb', line 19 def parsed_sources @parsed_sources end |
#raw_str ⇒ Object (readonly)
Returns the value of attribute raw_str.
19 20 21 |
# File 'lib/iev/source_parser.rb', line 19 def raw_str @raw_str end |
#src_split ⇒ Object (readonly)
Returns the value of attribute src_split.
19 20 21 |
# File 'lib/iev/source_parser.rb', line 19 def src_split @src_split end |
#src_str ⇒ Object (readonly)
Returns the value of attribute src_str.
19 20 21 |
# File 'lib/iev/source_parser.rb', line 19 def src_str @src_str end |