Class: Raudi::AVR::Pin
- Inherits:
-
Object
- Object
- Raudi::AVR::Pin
- Extended by:
- Forwardable
- Includes:
- PinStates
- Defined in:
- lib/raudi/avr/pin.rb
Constant Summary
Constants included from PinStates
Raudi::AVR::PinStates::DELIMITER
Instance Attribute Summary collapse
-
#number ⇒ Object
Returns the value of attribute number.
-
#port ⇒ Object
Returns the value of attribute port.
Instance Method Summary collapse
-
#initialize(port, number, types) ⇒ Pin
constructor
A new instance of Pin.
- #to_s ⇒ Object
Methods included from PinStates
included, #state_number, #to_c
Constructor Details
#initialize(port, number, types) ⇒ Pin
Returns a new instance of Pin.
16 17 18 19 20 |
# File 'lib/raudi/avr/pin.rb', line 16 def initialize(port, number, types) self.port = port self.number = number load_states(types) end |
Instance Attribute Details
#number ⇒ Object
Returns the value of attribute number.
12 13 14 |
# File 'lib/raudi/avr/pin.rb', line 12 def number @number end |
#port ⇒ Object
Returns the value of attribute port.
12 13 14 |
# File 'lib/raudi/avr/pin.rb', line 12 def port @port end |
Instance Method Details
#to_s ⇒ Object
22 23 24 |
# File 'lib/raudi/avr/pin.rb', line 22 def to_s "Pin #{name}#{number} <#{state}>" end |