Module: Saper::DSL::Methods

Defined in:
lib/saper/core/dsl.rb

Overview

A mixin module with a set of parsing methods

Instance Method Summary collapse

Instance Method Details

#[](name) ⇒ Object


30
31
32
# File 'lib/saper/core/dsl.rb', line 30

def [](name)
  namespace[name]
end

#namespaceObject


20
21
22
# File 'lib/saper/core/dsl.rb', line 20

def namespace
  @namespace ||= Saper::Namespace.new
end

#recipe(id, name = nil, &block) ⇒ Object


25
26
27
# File 'lib/saper/core/dsl.rb', line 25

def recipe(id, name = nil, &block)
  namespace[id] = Recipe.parse(id, name, namespace, &block)
end