Module: Toil
- Defined in:
- lib/toil.rb,
lib/toil/version.rb,
lib/toil/arguments.rb,
lib/toil/prototype.rb,
lib/toil/attributes.rb,
lib/toil/dynamic_value.rb
Defined Under Namespace
Classes: Arguments, Attributes, DynamicValue, Prototype
Constant Summary
collapse
- MAJOR =
0
- MINOR =
1
- TINY =
0
- VERSION =
[MAJOR, MINOR, TINY].join('.').freeze
Class Method Summary
collapse
Class Method Details
.[](prototype_name) ⇒ Object
12
13
14
|
# File 'lib/toil.rb', line 12
def [](prototype_name)
Prototype[prototype_name]
end
|
.call(prototype_name, *overrides) ⇒ Object
Also known as:
create
7
8
9
|
# File 'lib/toil.rb', line 7
def call(prototype_name, *overrides)
self[prototype_name].call(*overrides)
end
|
.register(prototype_name, obj = nil, &blk) ⇒ Object
16
17
18
|
# File 'lib/toil.rb', line 16
def register(prototype_name, obj = nil, &blk)
Prototype.register(prototype_name, obj, &blk)
end
|
.to_a(prototype_name, *overrides) ⇒ Object
Also known as:
args, arguments
20
21
22
|
# File 'lib/toil.rb', line 20
def to_a(prototype_name, *overrides)
self[prototype_name].to_a(*overrides)
end
|
.to_h(prototype_name, overrides = {}) ⇒ Object
Also known as:
atts, attributes, params
26
27
28
|
# File 'lib/toil.rb', line 26
def to_h(prototype_name, overrides = {})
self[prototype_name].to_h(overrides)
end
|
.version ⇒ Object
9
10
11
|
# File 'lib/toil/version.rb', line 9
def self.version
VERSION
end
|