Class: GH::LazyLoader
Overview
Public: …
Instance Attribute Summary
Attributes inherited from Wrapper
Instance Method Summary collapse
-
#modify_hash(hash, loaded = false) ⇒ Object
rubocop:disable Style/OptionalBooleanParameter.
Methods inherited from Wrapper
#[], [], double_dispatch, #generate_response, #initialize, #inspect, #load, #prefixed, #reset, wraps
Constructor Details
This class inherits a constructor from GH::Wrapper
Instance Method Details
#modify_hash(hash, loaded = false) ⇒ Object
rubocop:disable Style/OptionalBooleanParameter
11 12 13 14 15 16 17 18 |
# File 'lib/gh/lazy_loader.rb', line 11 def modify_hash(hash, loaded = false) # rubocop:disable Style/OptionalBooleanParameter hash = super(hash) link = hash['_links']['self'] unless loaded || hash['_links'].nil? setup_lazy_loading(hash, link['href']) if link hash rescue StandardError => e raise Error.new(e, hash) end |