Class: Circuits::Component::Or
- Defined in:
- lib/circuits/component/or.rb
Overview
Logical OR Operator
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
-
#tick ⇒ Object
Sets the output to be the result of a logical OR of the inputs.
Methods inherited from Base
Constructor Details
This class inherits a constructor from Circuits::Component::Base
Instance Method Details
#tick ⇒ Object
Sets the output to be the result of a logical OR of the inputs
8 9 10 |
# File 'lib/circuits/component/or.rb', line 8 def tick self[:out].set(inputs.map(&:get).inject(:|)) end |