Class GH::Wrapper
In: lib/gh/wrapper.rb
Parent: Object

Public: Simple base class for low level layers. Handy if you want to manipulate resources coming in from Github.

Examples

  class IndifferentAccess
    def [](key) super.tap { |r| r.data.with_indifferent_access! } end
  end

  gh = IndifferentAccess.new
  gh['users/rkh'][:name] # => "Konstantin Haase"

  # easy to use in the low level stack
  gh = Github.build do
    use GH::Cache
    use IndifferentAccess
    use GH::Normalizer
  end

Methods

[]   []   backend=   frontend   frontend=   generate_response   inspect   load   new   prefixed   reset   wraps  

Included Modules

Case

Attributes

backend  [R]  Public: Get wrapped layer.
options  [R]  Public: …

Public Class methods

Public: Retrieves resources from Github.

Public: Initialize a new Wrapper.

backend - layer to be wrapped options - config options

Internal: Get/set default layer to wrap when creating a new instance.

Public Instance methods

Public: Retrieves resources from Github.

By default, this method is delegated to the next layer on the stack and modify is called.

Public: Set wrapped layer.

Internal: …

Internal: …

Public: …

Public: …

Internal: …

Public: …

[Validate]