Class: ConditionsFu::Builder

Inherits:
Object
  • Object
show all
Defined in:
lib/conditions_fu/builder.rb

Class Method Summary collapse

Class Method Details

.blueprint(name = :master, &blueprint) ⇒ Object



165
166
167
168
169
170
# File 'lib/conditions_fu/builder.rb', line 165

def self.blueprint(name = :master, &blueprint)
  @conditions = ConditionsArray.new
  @prints ||= {}
  @prints[name] = blueprint if block_given?
  @prints[name]
end

.clear_blueprints!Object



180
181
182
# File 'lib/conditions_fu/builder.rb', line 180

def self.clear_blueprints!
  @blueprints = {}
end

.make(blueprint, params) ⇒ Object



172
173
174
# File 'lib/conditions_fu/builder.rb', line 172

def self.make(blueprint, params)
  Lathe.run(blueprint, params)
end

.named_blueprintsObject



176
177
178
# File 'lib/conditions_fu/builder.rb', line 176

def self.named_blueprints
  @blueprints.reject{|name,_| name == :master }.keys
end