Module: Brainstorm
- Defined in:
- lib/brainstorm.rb
Defined Under Namespace
Classes: Aggregator, Debouncer, Finish, Forwarder, Neuron, Selector, Start, Value
Class Method Summary
collapse
Instance Method Summary
collapse
Class Method Details
.function_for(*args, &block) ⇒ Object
45
46
47
48
49
50
51
52
53
54
55
|
# File 'lib/brainstorm.rb', line 45
def self.function_for(*args, &block)
if block
return block
elsif args.size == 1
return args[0]
elsif args.size == 2
return args[0].method(args[1])
else
raise ArgumentError, "Unable to convert arguments to a callable"
end
end
|
Instance Method Details
#finish ⇒ Object
22
23
24
|
# File 'lib/brainstorm.rb', line 22
def finish
Finish.new
end
|
#select(*args, &block) ⇒ Object
105
106
107
|
# File 'lib/brainstorm.rb', line 105
def select(*args, &block)
Selector.new(*args, &block)
end
|
#start ⇒ Object
12
13
14
|
# File 'lib/brainstorm.rb', line 12
def start
Start.new
end
|
#value(value) ⇒ Object
39
40
41
|
# File 'lib/brainstorm.rb', line 39
def value(value)
Value.new(value)
end
|