Class: Circuits::Component::Nor
- Inherits:
-
Object
- Object
- Circuits::Component::Nor
- Includes:
- Circuits::Component
- Defined in:
- lib/circuits/component/nor.rb
Overview
Logical NOR Operator
Instance Attribute Summary
Attributes included from Circuits::Component
Instance Method Summary collapse
-
#tick ⇒ Object
Sets the output to be the result of a logical OR of the inputs.
Methods included from Circuits::Component
#[], #[]=, #initialize, #tock
Instance Method Details
#tick ⇒ Object
Sets the output to be the result of a logical OR of the inputs
10 11 12 |
# File 'lib/circuits/component/nor.rb', line 10 def tick outputs[0].set(!inputs.map(&:get).inject(:|)) end |