Class: Workshop::Project::Configuration
- Inherits:
-
Object
- Object
- Workshop::Project::Configuration
- Defined in:
- lib/workshop/project/configuration.rb,
lib/workshop/project/configuration/build.rb,
lib/workshop/project/configuration/upload.rb
Defined Under Namespace
Instance Attribute Summary collapse
-
#arduino_app_directory ⇒ Object
Returns the value of attribute arduino_app_directory.
-
#build ⇒ Object
Returns the value of attribute build.
-
#build_directory ⇒ Object
Returns the value of attribute build_directory.
-
#libraries ⇒ Object
Returns the value of attribute libraries.
-
#main_filename ⇒ Object
Returns the value of attribute main_filename.
-
#project_name ⇒ Object
Returns the value of attribute project_name.
-
#source_directory ⇒ Object
Returns the value of attribute source_directory.
-
#upload ⇒ Object
Returns the value of attribute upload.
Instance Method Summary collapse
- #app_directory ⇒ Object
- #build_core ⇒ Object
- #build_f_cpu ⇒ Object
- #build_mcu ⇒ Object
- #build_pid ⇒ Object
- #build_variant ⇒ Object
- #build_vid ⇒ Object
- #default_build_directory ⇒ Object
- #default_project_name ⇒ Object
- #default_source_directory ⇒ Object
- #includes ⇒ Object
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
- #upload_protocol ⇒ Object
- #upload_speed ⇒ Object
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
7 8 9 10 11 12 13 14 15 |
# File 'lib/workshop/project/configuration.rb', line 7 def initialize self.arduino_app_directory = '/Applications/Arduino.app' self.project_name = default_project_name self.source_directory = default_source_directory self.build_directory = default_build_directory self.libraries = [] self.build = Build.new self.upload = Upload.new end |
Instance Attribute Details
#arduino_app_directory ⇒ Object
Returns the value of attribute arduino_app_directory.
4 5 6 |
# File 'lib/workshop/project/configuration.rb', line 4 def arduino_app_directory @arduino_app_directory end |
#build ⇒ Object
Returns the value of attribute build.
4 5 6 |
# File 'lib/workshop/project/configuration.rb', line 4 def build @build end |
#build_directory ⇒ Object
Returns the value of attribute build_directory.
4 5 6 |
# File 'lib/workshop/project/configuration.rb', line 4 def build_directory @build_directory end |
#libraries ⇒ Object
Returns the value of attribute libraries.
4 5 6 |
# File 'lib/workshop/project/configuration.rb', line 4 def libraries @libraries end |
#main_filename ⇒ Object
Returns the value of attribute main_filename.
4 5 6 |
# File 'lib/workshop/project/configuration.rb', line 4 def main_filename @main_filename end |
#project_name ⇒ Object
Returns the value of attribute project_name.
4 5 6 |
# File 'lib/workshop/project/configuration.rb', line 4 def project_name @project_name end |
#source_directory ⇒ Object
Returns the value of attribute source_directory.
4 5 6 |
# File 'lib/workshop/project/configuration.rb', line 4 def source_directory @source_directory end |
#upload ⇒ Object
Returns the value of attribute upload.
4 5 6 |
# File 'lib/workshop/project/configuration.rb', line 4 def upload @upload end |
Instance Method Details
#app_directory ⇒ Object
33 34 35 |
# File 'lib/workshop/project/configuration.rb', line 33 def app_directory Dir.pwd end |
#build_core ⇒ Object
37 38 39 |
# File 'lib/workshop/project/configuration.rb', line 37 def build_core build.core end |
#build_f_cpu ⇒ Object
49 50 51 |
# File 'lib/workshop/project/configuration.rb', line 49 def build_f_cpu build.f_cpu end |
#build_mcu ⇒ Object
45 46 47 |
# File 'lib/workshop/project/configuration.rb', line 45 def build_mcu build.mcu end |
#build_pid ⇒ Object
57 58 59 |
# File 'lib/workshop/project/configuration.rb', line 57 def build_pid build.pid end |
#build_variant ⇒ Object
41 42 43 |
# File 'lib/workshop/project/configuration.rb', line 41 def build_variant build.variant end |
#build_vid ⇒ Object
53 54 55 |
# File 'lib/workshop/project/configuration.rb', line 53 def build_vid build.vid end |
#default_build_directory ⇒ Object
25 26 27 |
# File 'lib/workshop/project/configuration.rb', line 25 def default_build_directory app_directory + '/build' end |
#default_project_name ⇒ Object
21 22 23 |
# File 'lib/workshop/project/configuration.rb', line 21 def default_project_name app_directory.split('/').last.parameterize.underscore end |
#default_source_directory ⇒ Object
29 30 31 |
# File 'lib/workshop/project/configuration.rb', line 29 def default_source_directory app_directory + '/src' end |
#includes ⇒ Object
17 18 19 |
# File 'lib/workshop/project/configuration.rb', line 17 def includes build.includes end |
#upload_protocol ⇒ Object
61 62 63 |
# File 'lib/workshop/project/configuration.rb', line 61 def upload_protocol upload.protocol end |
#upload_speed ⇒ Object
65 66 67 |
# File 'lib/workshop/project/configuration.rb', line 65 def upload_speed upload.speed end |