Class: Glib::JsonCrawler::NavInitiate
- Inherits:
-
ActionCrawler
- Object
- ActionCrawler
- Glib::JsonCrawler::NavInitiate
- Defined in:
- lib/glib/json_crawler/action_crawlers/nav_initiate.rb
Instance Method Summary collapse
-
#initialize(http, args, action) ⇒ NavInitiate
constructor
A new instance of NavInitiate.
Methods inherited from ActionCrawler
Constructor Details
#initialize(http, args, action) ⇒ NavInitiate
Returns a new instance of NavInitiate.
4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/glib/json_crawler/action_crawlers/nav_initiate.rb', line 4 def initialize(http, args, action) super(http) @http = http if (json = (@http.get args['url'], action, args.except('url'))) && (left_drawer = json['leftDrawer']) crawl left_drawer['header']&.[]('childViews') crawl left_drawer['rows'] crawl left_drawer['body']&.[]('childViews') end # if (on_load = (args.fetch('onLoad', nil))) # perform(on_load) # end end |