Class GH::Stack
In: lib/gh/stack.rb
Parent: Object

Public: Exposes DSL for stacking wrappers.

Examples

  api = GH::Stack.build do
    use GH::Cache, cache: Rails.cache
    use GH::Normalizer
    use GH::Remote, username: "admin", password: "admin"
  end

Methods

build   build   new   new   replace   use  

Attributes

options  [R] 

Public Class methods

Public: Generates a new wrapper stack from the given block.

options - Hash of options that will be passed to all layers upon initialization.

Returns top most Wrapper instance.

Public: Generates a new Stack instance.

options - Hash of options that will be passed to all layers upon initialization.

Can be used for easly stacking layers.

Public Instance methods

Public: Generates wrapper instances for stack configuration.

options - Hash of options that will be passed to all layers upon initialization.

Returns top most Wrapper instance.

new(options = {})

Alias for build

Public: Adds a new layer to the stack.

Layer will be wrapped by layers already on the stack.

[Validate]