Sha256: 50c127ed230f6ab3b768c89f9e3c8c2060200f638f9ed0b93527f35cf33a570b
Contents?: true
Size: 467 Bytes
Versions: 39
Compression:
Stored size: 467 Bytes
Contents
module GH class LinkFollower < Wrapper wraps GH::Normalizer double_dispatch def modify_hash(hash) hash = super setup_lazy_loading(hash) if hash['_links'] hash rescue Exception => error raise Error.new(error, hash) end private def lazy_load(hash, key) link = hash['_links'][key] { key => self[link['href']] } if link rescue Exception => error raise Error.new(error, hash) end end end
Version data entries
39 entries across 39 versions & 2 rubygems