Parent

Methods

Files

Class/Module Index [+]

Quicksearch

Moneta::Stack::DSL

@api private

Public Class Methods

new(stack, &block) click to toggle source
# File lib/moneta/stack.rb, line 20
def initialize(stack, &block)
  @stack = stack
  instance_eval(&block)
end

Public Instance Methods

add(store = nil, &block) click to toggle source

@api public

# File lib/moneta/stack.rb, line 26
def add(store = nil, &block)
  raise ArgumentError, 'Only argument or block allowed' if store && block
  @stack << (store || Moneta.build(&block))
  nil
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.