Class: GH::Normalizer
Overview
Public: A Wrapper class that deals with normalizing Github responses.
Instance Attribute Summary
Attributes inherited from Wrapper
Instance Method Summary collapse
-
#[](key) ⇒ Object
Public: Fetches and normalizes a github entity.
Methods inherited from Wrapper
[], #frontend, #frontend=, #initialize, #inspect, #load, #prefixed, #reset, wraps
Constructor Details
This class inherits a constructor from GH::Wrapper
Instance Method Details
#[](key) ⇒ Object
Public: Fetches and normalizes a github entity.
Returns normalized Response.
10 11 12 13 14 |
# File 'lib/gh/normalizer.rb', line 10 def [](key) result = super links(result)['self'] ||= { 'href' => full_url(key).to_s } if result.respond_to? :to_hash result end |