Class: Pin

Inherits:
Object
  • Object
show all
Defined in:
lib/rad/sim/arduino_sketch.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#numObject

Returns the value of attribute num.



50
51
52
# File 'lib/rad/sim/arduino_sketch.rb', line 50

def num
  @num
end

#typeObject

Returns the value of attribute type.



50
51
52
# File 'lib/rad/sim/arduino_sketch.rb', line 50

def type
  @type
end

#valueObject

Returns the value of attribute value.



50
51
52
# File 'lib/rad/sim/arduino_sketch.rb', line 50

def value
  @value
end