class Barn::Builders::Hash

Public Class Methods

new(app) click to toggle source
# File lib/barn/builders/hash.rb, line 4
def initialize(app)
  @app = app
end

Public Instance Methods

call(env) click to toggle source

‘env` is a hash with:

:name    - symbol name of the factory
:options - optional params passed to `Barn.define`
:args    - parameters passed to the block of`Barn.build`
# File lib/barn/builders/hash.rb, line 12
def call(env)
  object = @app.call(env)
  object.merge(env[:args])
end