Module: Denko::Behaviors::Component
- Includes:
- State
- Included in:
- BusController, BusPeripheral, InputPin, MultiPin, OutputPin, SinglePin, EEPROM::Board, Sensor::JSNSR04T
- Defined in:
- lib/denko/behaviors/component.rb
Constant Summary
Constants included from Lifecycle
Instance Attribute Summary collapse
-
#board ⇒ Object
readonly
Returns the value of attribute board.
-
#params ⇒ Object
readonly
Returns the value of attribute params.
Attributes included from State
Instance Method Summary collapse
Methods included from State
Methods included from Lifecycle
Instance Attribute Details
#board ⇒ Object (readonly)
Returns the value of attribute board.
4 5 6 |
# File 'lib/denko/behaviors/component.rb', line 4 def board @board end |
#params ⇒ Object (readonly)
Returns the value of attribute params.
4 5 6 |
# File 'lib/denko/behaviors/component.rb', line 4 def params @params end |
Instance Method Details
#initialize(options = {}) ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/denko/behaviors/component.rb', line 7 def initialize(={}) @params = run_before_initialize_cbs initialize_board convert_pins(params) initialize_pins(params) register run_after_initialize_cbs end |
#micro_delay(duration) ⇒ Object
19 20 21 |
# File 'lib/denko/behaviors/component.rb', line 19 def micro_delay(duration) board.micro_delay(duration) end |