Class: Html2rss::Recon::Result

Inherits:
Data
  • Object
show all
Defined in:
lib/html2rss/recon.rb

Overview

Immutable outcome of a reconnaissance operation.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#articles_countObject (readonly)

Returns the value of attribute articles_count

Returns:

  • (Object)

    the current value of articles_count



64
65
66
# File 'lib/html2rss/recon.rb', line 64

def articles_count
  @articles_count
end

#final_urlObject (readonly)

Returns the value of attribute final_url

Returns:

  • (Object)

    the current value of final_url



64
65
66
# File 'lib/html2rss/recon.rb', line 64

def final_url
  @final_url
end

#html_bytesizeObject (readonly)

Returns the value of attribute html_bytesize

Returns:

  • (Object)

    the current value of html_bytesize



64
65
66
# File 'lib/html2rss/recon.rb', line 64

def html_bytesize
  @html_bytesize
end

#native_feedObject (readonly)

Returns the value of attribute native_feed

Returns:

  • (Object)

    the current value of native_feed



64
65
66
# File 'lib/html2rss/recon.rb', line 64

def native_feed
  @native_feed
end

#notesObject (readonly)

Returns the value of attribute notes

Returns:

  • (Object)

    the current value of notes



64
65
66
# File 'lib/html2rss/recon.rb', line 64

def notes
  @notes
end

#requested_urlObject (readonly)

Returns the value of attribute requested_url

Returns:

  • (Object)

    the current value of requested_url



64
65
66
# File 'lib/html2rss/recon.rb', line 64

def requested_url
  @requested_url
end

#scheme_downgradeObject (readonly)

Returns the value of attribute scheme_downgrade

Returns:

  • (Object)

    the current value of scheme_downgrade



64
65
66
# File 'lib/html2rss/recon.rb', line 64

def scheme_downgrade
  @scheme_downgrade
end

#statusObject (readonly)

Returns the value of attribute status

Returns:

  • (Object)

    the current value of status



64
65
66
# File 'lib/html2rss/recon.rb', line 64

def status
  @status
end

#surface_categoryObject (readonly)

Returns the value of attribute surface_category

Returns:

  • (Object)

    the current value of surface_category



64
65
66
# File 'lib/html2rss/recon.rb', line 64

def surface_category
  @surface_category
end

#verdictObject (readonly)

Returns the value of attribute verdict

Returns:

  • (Object)

    the current value of verdict



64
65
66
# File 'lib/html2rss/recon.rb', line 64

def verdict
  @verdict
end

Instance Method Details

#build?Boolean

Returns:

  • (Boolean)


78
# File 'lib/html2rss/recon.rb', line 78

def build? = verdict.build?

#defer?Boolean

Returns:

  • (Boolean)


82
# File 'lib/html2rss/recon.rb', line 82

def defer? = verdict.defer?

#drop?Boolean

Returns:

  • (Boolean)


86
# File 'lib/html2rss/recon.rb', line 86

def drop? = verdict.drop?

#native_feed?Boolean

Returns:

  • (Boolean)


90
# File 'lib/html2rss/recon.rb', line 90

def native_feed? = !native_feed.nil?

#to_hHash{Symbol => Object}

Returns:

  • (Hash{Symbol => Object})


94
95
96
97
98
99
100
101
102
103
104
105
106
107
# File 'lib/html2rss/recon.rb', line 94

def to_h # rubocop:disable Metrics/MethodLength
  {
    requested_url: requested_url.to_s,
    final_url: final_url.to_s,
    status:,
    verdict: verdict.to_sym,
    native_feed: native_feed&.to_s,
    surface_category: surface_category&.to_s,
    articles_count:,
    scheme_downgrade:,
    notes:,
    html_bytesize:
  }.compact
end