Class: Pin
- Inherits:
-
Object
- Object
- Pin
- Defined in:
- lib/rad/sim/arduino_sketch.rb
Instance Attribute Summary collapse
-
#num ⇒ Object
Returns the value of attribute num.
-
#type ⇒ Object
Returns the value of attribute type.
-
#value ⇒ Object
Returns the value of attribute value.
Instance Method Summary collapse
-
#initialize(num, opts) ⇒ Pin
constructor
A new instance of Pin.
Constructor Details
#initialize(num, opts) ⇒ Pin
Returns a new instance of Pin.
52 53 54 55 56 |
# File 'lib/rad/sim/arduino_sketch.rb', line 52 def initialize num, opts @num = num @type = opts[:type] @value = opts[:value] || false end |
Instance Attribute Details
#num ⇒ Object
Returns the value of attribute num.
50 51 52 |
# File 'lib/rad/sim/arduino_sketch.rb', line 50 def num @num end |
#type ⇒ Object
Returns the value of attribute type.
50 51 52 |
# File 'lib/rad/sim/arduino_sketch.rb', line 50 def type @type end |
#value ⇒ Object
Returns the value of attribute value.
50 51 52 |
# File 'lib/rad/sim/arduino_sketch.rb', line 50 def value @value end |