Class: Circuits::Component::And
- Defined in:
- lib/circuits/component/and.rb
Overview
Logical AND Operator
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
-
#tick ⇒ Object
Sets the output to be the result of a logical AND 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 AND of the inputs
8 9 10 |
# File 'lib/circuits/component/and.rb', line 8 def tick self[:out].set(inputs.map(&:get).inject(:&)) end |