Class: Grubby::JsonScraper
- Defined in:
- lib/grubby/json_scraper.rb
Instance Attribute Summary collapse
-
#json ⇒ Hash, Array
readonly
The parsed JSON data being scraped.
Attributes inherited from Scraper
Instance Method Summary collapse
-
#initialize(source) ⇒ JsonScraper
constructor
A new instance of JsonScraper.
Methods inherited from Scraper
Constructor Details
#initialize(source) ⇒ JsonScraper
Returns a new instance of JsonScraper.
8 9 10 11 |
# File 'lib/grubby/json_scraper.rb', line 8 def initialize(source) @json = source.assert_kind_of!(Grubby::JsonParser).json super end |
Instance Attribute Details
#json ⇒ Hash, Array (readonly)
Returns The parsed JSON data being scraped.
5 6 7 |
# File 'lib/grubby/json_scraper.rb', line 5 def json @json end |