Class: Workshop::Arduino
- Inherits:
-
Object
- Object
- Workshop::Arduino
- Defined in:
- lib/workshop/arduino.rb
Instance Attribute Summary collapse
-
#config ⇒ Object
Returns the value of attribute config.
Instance Method Summary collapse
- #core_directory ⇒ Object
- #hardware_directory ⇒ Object
- #hardware_path ⇒ Object
-
#initialize(config) ⇒ Arduino
constructor
A new instance of Arduino.
- #variant_directory ⇒ Object
Constructor Details
#initialize(config) ⇒ Arduino
Returns a new instance of Arduino.
5 6 7 |
# File 'lib/workshop/arduino.rb', line 5 def initialize(config) self.config = config end |
Instance Attribute Details
#config ⇒ Object
Returns the value of attribute config.
3 4 5 |
# File 'lib/workshop/arduino.rb', line 3 def config @config end |
Instance Method Details
#core_directory ⇒ Object
17 18 19 |
# File 'lib/workshop/arduino.rb', line 17 def core_directory hardware_directory + '/arduino/cores/' + config.build_core end |
#hardware_directory ⇒ Object
13 14 15 |
# File 'lib/workshop/arduino.rb', line 13 def hardware_directory config.arduino_app_directory + hardware_path end |
#hardware_path ⇒ Object
9 10 11 |
# File 'lib/workshop/arduino.rb', line 9 def hardware_path '/Contents/Resources/Java/hardware' end |
#variant_directory ⇒ Object
21 22 23 24 25 26 27 28 29 30 31 32 |
# File 'lib/workshop/arduino.rb', line 21 def variant_directory # TODO - find proper variant dir (could be in documents) if config.build_variant dir = hardware_directory + '/arduino/variants/' + config.build_variant if File.directory?(dir) dir else nil end end end |