Module: Loom::Pattern::DSL

Defined in:
lib/loom/pattern/dsl.rb

Overview

The Loom DSL definition. See documentation above.

Defined Under Namespace

Classes: PatternBuilder

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#dsl_builderObject (readonly)

Returns the value of attribute dsl_builder.



322
323
324
# File 'lib/loom/pattern/dsl.rb', line 322

def dsl_builder
  @dsl_builder
end

Class Method Details

.extended(receiving_mod) ⇒ Object



325
326
327
328
329
330
# File 'lib/loom/pattern/dsl.rb', line 325

def extended(receiving_mod)
  # NB: Using Forwardable was awkward here due to the scope of extended, and
  # the scope of where the fordwardable instance variable would live.
  dsl_builder = PatternBuilder.new
  receiving_mod.instance_variable_set :@dsl_builder, dsl_builder
end