Module: Usine
- Extended by:
- Uber::InheritableAttr
- Defined in:
- lib/usine.rb,
lib/usine/factory.rb,
lib/usine/version.rb,
lib/usine/sequence.rb,
lib/usine/evaluator.rb,
lib/usine/definition.rb
Defined Under Namespace
Classes: Definition, Evaluator, Factory, Sequence
Constant Summary
collapse
- VERSION =
"1.0.0"
Class Method Summary
collapse
Class Method Details
.call(*args) ⇒ Object
17
18
19
|
# File 'lib/usine.rb', line 17
def call(*args)
Factory.(:call, args.shift, args.shift)
end
|
.definition(operation, *extensions, &block) ⇒ Object
33
34
35
36
37
38
39
40
41
|
# File 'lib/usine.rb', line 33
def definition(operation, *extensions, &block)
self.definitions[operation] ||= []
self.definitions[operation] << Definition.new(operation, &block)
extensions.each do |extension|
self.definitions[operation] << Definition.new(operation, &block)
end
end
|
.present(*args) ⇒ Object
25
26
27
|
# File 'lib/usine.rb', line 25
def present(*args)
Factory.(:present, args.shift, args.shift)
end
|
.run(*args) ⇒ Object
21
22
23
|
# File 'lib/usine.rb', line 21
def run(*args)
Factory.(:run, args.shift, args.shift)
end
|
.sequence(name, initial_value = 1, &block) ⇒ Object
29
30
31
|
# File 'lib/usine.rb', line 29
def sequence(name, initial_value = 1, &block)
self.sequences << Sequence.new(name, initial_value, &block)
end
|