Module: Blockenspiel::DSL

Included in:
Base, Builder, Builder::Target
Defined in:
lib/blockenspiel/dsl_setup.rb

Overview

DSL activation module

Include this module in a class to mark this class as a DSL class and make it possible for its methods to be called from a block that does not take a parameter.

After you include this module, you can use the directives defined in DSLSetupMethods to control what methods are available to DSL blocks that do not take parameters.

Class Method Summary collapse

Class Method Details

.included(klass_) ⇒ Object

:nodoc:



333
334
335
336
337
338
# File 'lib/blockenspiel/dsl_setup.rb', line 333

def self.included(klass_)  # :nodoc:
  unless klass_.kind_of?(::Class)
    raise ::Blockenspiel::BlockenspielError, "You cannot include Blockenspiel::DSL in a module (yet)"
  end
  klass_.extend(::Blockenspiel::DSLSetupMethods)
end