Class: WiringPi::Modules::ModuleBase
- Inherits:
-
Object
- Object
- WiringPi::Modules::ModuleBase
- Defined in:
- lib/wiringpi2.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#pin_base ⇒ Object
readonly
Returns the value of attribute pin_base.
-
#pin_count ⇒ Object
readonly
Returns the value of attribute pin_count.
-
#pin_end ⇒ Object
readonly
Returns the value of attribute pin_end.
Instance Method Summary collapse
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
27 28 29 |
# File 'lib/wiringpi2.rb', line 27 def name @name end |
#pin_base ⇒ Object (readonly)
Returns the value of attribute pin_base.
27 28 29 |
# File 'lib/wiringpi2.rb', line 27 def pin_base @pin_base end |
#pin_count ⇒ Object (readonly)
Returns the value of attribute pin_count.
27 28 29 |
# File 'lib/wiringpi2.rb', line 27 def pin_count @pin_count end |
#pin_end ⇒ Object (readonly)
Returns the value of attribute pin_end.
27 28 29 |
# File 'lib/wiringpi2.rb', line 27 def pin_end @pin_end end |
Instance Method Details
#new ⇒ Object
29 30 31 32 |
# File 'lib/wiringpi2.rb', line 29 def new @pin_end = @pin_base + @pin_count updateName end |
#updateName ⇒ Object
34 35 36 |
# File 'lib/wiringpi2.rb', line 34 def updateName @name = ' at offset ' + @pin_base.to_s end |