Sha256: e0c193dcf827ae76bfd5a464cce5fd7d169dfd5a527b311051c17e4bdb7d4288

Contents?: true

Size: 349 Bytes

Versions: 5

Compression:

Stored size: 349 Bytes

Contents

module SpinningWheel
  def self.define(&block)
    DSL.run(block)
  end

  class DSL
    def self.run(block)
      new.instance_eval(&block)
    end

    def fabric(name:, class_name:, &block)
      fabric = SpinningWheel::Fabric.
        new(name: name, class_name: class_name, &block)
      SpinningWheel.register_fabric(fabric)
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
spinning_wheel-1.0.0 lib/spinning_wheel/syntax.rb
spinning_wheel-0.2.2 lib/spinning_wheel/syntax.rb
spinning_wheel-0.2.1 lib/spinning_wheel/syntax.rb
spinning_wheel-0.2.0 lib/spinning_wheel/syntax.rb
spinning_wheel-0.1.0 lib/spinning_wheel/syntax.rb