Class: Html2rss::Capture::CaptureResult
- Inherits:
-
Data
- Object
- Data
- Html2rss::Capture::CaptureResult
- Defined in:
- lib/html2rss/capture.rb
Overview
Result of a capture operation (config plus quality meta).
Instance Attribute Summary collapse
-
#admission_drops ⇒ Object
readonly
Returns the value of attribute admission_drops.
-
#articles_count ⇒ Object
readonly
Returns the value of attribute articles_count.
-
#channel_title ⇒ Object
readonly
Returns the value of attribute channel_title.
-
#config ⇒ Object
readonly
Returns the value of attribute config.
-
#has_selectors ⇒ Object
readonly
Returns the value of attribute has_selectors.
-
#inferred_topics ⇒ Object
readonly
Returns the value of attribute inferred_topics.
-
#native_feed ⇒ Object
readonly
Returns the value of attribute native_feed.
-
#segment_strategy ⇒ Object
readonly
Returns the value of attribute segment_strategy.
-
#selected_strategy ⇒ Object
readonly
Returns the value of attribute selected_strategy.
-
#suggested_channel_url ⇒ Object
readonly
Returns the value of attribute suggested_channel_url.
-
#yaml ⇒ Object
readonly
Returns the value of attribute yaml.
Instance Method Summary collapse
-
#initialize(config:, articles_count:, channel_title:, has_selectors:, segment_strategy:, yaml: nil, admission_drops: {}, selected_strategy: nil, inferred_topics: [], native_feed: nil, suggested_channel_url: nil) ⇒ CaptureResult
constructor
rubocop:disable Metrics/ParameterLists.
-
#native_feed? ⇒ Boolean
Whether first-party RSS was detected.
Constructor Details
#initialize(config:, articles_count:, channel_title:, has_selectors:, segment_strategy:, yaml: nil, admission_drops: {}, selected_strategy: nil, inferred_topics: [], native_feed: nil, suggested_channel_url: nil) ⇒ CaptureResult
rubocop:disable Metrics/ParameterLists
47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 |
# File 'lib/html2rss/capture.rb', line 47 def initialize(config:, articles_count:, channel_title:, has_selectors:, segment_strategy:, # rubocop:disable Metrics/MethodLength yaml: nil, admission_drops: {}, selected_strategy: nil, inferred_topics: [], native_feed: nil, suggested_channel_url: nil) super( config:, yaml: yaml || "#{SCHEMA_MODELINE}\n#{Config.to_yaml(config)}", articles_count:, channel_title:, has_selectors:, segment_strategy:, admission_drops:, selected_strategy:, inferred_topics:, native_feed:, suggested_channel_url: ) end |
Instance Attribute Details
#admission_drops ⇒ Object (readonly)
Returns the value of attribute admission_drops
30 31 32 |
# File 'lib/html2rss/capture.rb', line 30 def admission_drops @admission_drops end |
#articles_count ⇒ Object (readonly)
Returns the value of attribute articles_count
30 31 32 |
# File 'lib/html2rss/capture.rb', line 30 def articles_count @articles_count end |
#channel_title ⇒ Object (readonly)
Returns the value of attribute channel_title
30 31 32 |
# File 'lib/html2rss/capture.rb', line 30 def channel_title @channel_title end |
#config ⇒ Object (readonly)
Returns the value of attribute config
30 31 32 |
# File 'lib/html2rss/capture.rb', line 30 def config @config end |
#has_selectors ⇒ Object (readonly)
Returns the value of attribute has_selectors
30 31 32 |
# File 'lib/html2rss/capture.rb', line 30 def has_selectors @has_selectors end |
#inferred_topics ⇒ Object (readonly)
Returns the value of attribute inferred_topics
30 31 32 |
# File 'lib/html2rss/capture.rb', line 30 def inferred_topics @inferred_topics end |
#native_feed ⇒ Object (readonly)
Returns the value of attribute native_feed
30 31 32 |
# File 'lib/html2rss/capture.rb', line 30 def native_feed @native_feed end |
#segment_strategy ⇒ Object (readonly)
Returns the value of attribute segment_strategy
30 31 32 |
# File 'lib/html2rss/capture.rb', line 30 def segment_strategy @segment_strategy end |
#selected_strategy ⇒ Object (readonly)
Returns the value of attribute selected_strategy
30 31 32 |
# File 'lib/html2rss/capture.rb', line 30 def selected_strategy @selected_strategy end |
#suggested_channel_url ⇒ Object (readonly)
Returns the value of attribute suggested_channel_url
30 31 32 |
# File 'lib/html2rss/capture.rb', line 30 def suggested_channel_url @suggested_channel_url end |
#yaml ⇒ Object (readonly)
Returns the value of attribute yaml
30 31 32 |
# File 'lib/html2rss/capture.rb', line 30 def yaml @yaml end |
Instance Method Details
#native_feed? ⇒ Boolean
Returns whether first-party RSS was detected.
68 69 70 |
# File 'lib/html2rss/capture.rb', line 68 def native_feed? !native_feed.nil? end |