Module: Kashmir::InlineDsl

Defined in:
lib/kashmir/inline_dsl.rb

Class Method Summary collapse

Class Method Details

.build(&definitions) ⇒ Object



4
5
6
7
8
9
10
11
# File 'lib/kashmir/inline_dsl.rb', line 4

def self.build(&definitions)
  inline_representer = Class.new do
    include Kashmir::Dsl
  end

  inline_representer.class_eval(&definitions) if block_given?
  inline_representer
end