Module: CallableTree::Node::Internal::Strategy
- Included in:
- Broadcast, Compose, Seek
- Defined in:
- lib/callable_tree/node/internal/strategy.rb,
lib/callable_tree/node/internal/strategy/seek.rb,
lib/callable_tree/node/internal/strategy/compose.rb,
lib/callable_tree/node/internal/strategy/broadcast.rb
Defined Under Namespace
Classes: Broadcast, Compose, Seek
Instance Method Summary
collapse
Instance Method Details
#==(other) ⇒ Object
15
16
17
|
# File 'lib/callable_tree/node/internal/strategy.rb', line 15
def ==(other)
name == other.name && matchable? == other.matchable? && terminable? == other.terminable?
end
|
#call(_nodes, *_inputs, **_options) ⇒ Object
7
8
9
|
# File 'lib/callable_tree/node/internal/strategy.rb', line 7
def call(_nodes, *_inputs, **_options)
raise ::CallableTree::Error, 'Not implemented'
end
|
#eql?(other) ⇒ Boolean
19
20
21
|
# File 'lib/callable_tree/node/internal/strategy.rb', line 19
def eql?(other)
instance_of?(other.class) && self == other
end
|
#hash ⇒ Object
23
24
25
|
# File 'lib/callable_tree/node/internal/strategy.rb', line 23
def hash
[self.class.name, matchable, terminable].join('-').hash
end
|
#matchable? ⇒ Boolean
27
28
29
|
# File 'lib/callable_tree/node/internal/strategy.rb', line 27
def matchable?
matchable
end
|
#name ⇒ Object
11
12
13
|
# File 'lib/callable_tree/node/internal/strategy.rb', line 11
def name
@name ||= self.class.name.split('::').last.downcase.to_sym
end
|
#terminable? ⇒ Boolean
31
32
33
|
# File 'lib/callable_tree/node/internal/strategy.rb', line 31
def terminable?
terminable
end
|