Class: Gordon::Options
- Inherits:
-
Object
- Object
- Gordon::Options
- Defined in:
- lib/gordon/options.rb
Instance Attribute Summary collapse
-
#app_description ⇒ Object
Returns the value of attribute app_description.
-
#app_homepage ⇒ Object
Returns the value of attribute app_homepage.
-
#app_name ⇒ Object
Returns the value of attribute app_name.
-
#app_source ⇒ Object
Returns the value of attribute app_source.
-
#app_source_excludes ⇒ Object
Returns the value of attribute app_source_excludes.
-
#app_type ⇒ Object
Returns the value of attribute app_type.
-
#app_version ⇒ Object
Returns the value of attribute app_version.
-
#debug ⇒ Object
Returns the value of attribute debug.
-
#http_server_type ⇒ Object
Returns the value of attribute http_server_type.
-
#init_type ⇒ Object
Returns the value of attribute init_type.
-
#output_dir ⇒ Object
Returns the value of attribute output_dir.
-
#package_type ⇒ Object
Returns the value of attribute package_type.
-
#recipe ⇒ Object
Returns the value of attribute recipe.
-
#runtime_name ⇒ Object
Returns the value of attribute runtime_name.
-
#runtime_version ⇒ Object
Returns the value of attribute runtime_version.
-
#trace ⇒ Object
Returns the value of attribute trace.
-
#web_server_type ⇒ Object
Returns the value of attribute web_server_type.
Class Method Summary collapse
Instance Attribute Details
#app_description ⇒ Object
Returns the value of attribute app_description.
3 4 5 |
# File 'lib/gordon/options.rb', line 3 def app_description @app_description end |
#app_homepage ⇒ Object
Returns the value of attribute app_homepage.
3 4 5 |
# File 'lib/gordon/options.rb', line 3 def app_homepage @app_homepage end |
#app_name ⇒ Object
Returns the value of attribute app_name.
3 4 5 |
# File 'lib/gordon/options.rb', line 3 def app_name @app_name end |
#app_source ⇒ Object
Returns the value of attribute app_source.
3 4 5 |
# File 'lib/gordon/options.rb', line 3 def app_source @app_source end |
#app_source_excludes ⇒ Object
Returns the value of attribute app_source_excludes.
3 4 5 |
# File 'lib/gordon/options.rb', line 3 def app_source_excludes @app_source_excludes end |
#app_type ⇒ Object
Returns the value of attribute app_type.
3 4 5 |
# File 'lib/gordon/options.rb', line 3 def app_type @app_type end |
#app_version ⇒ Object
Returns the value of attribute app_version.
3 4 5 |
# File 'lib/gordon/options.rb', line 3 def app_version @app_version end |
#debug ⇒ Object
Returns the value of attribute debug.
11 12 13 |
# File 'lib/gordon/options.rb', line 11 def debug @debug end |
#http_server_type ⇒ Object
Returns the value of attribute http_server_type.
6 7 8 |
# File 'lib/gordon/options.rb', line 6 def http_server_type @http_server_type end |
#init_type ⇒ Object
Returns the value of attribute init_type.
8 9 10 |
# File 'lib/gordon/options.rb', line 8 def init_type @init_type end |
#output_dir ⇒ Object
Returns the value of attribute output_dir.
10 11 12 |
# File 'lib/gordon/options.rb', line 10 def output_dir @output_dir end |
#package_type ⇒ Object
Returns the value of attribute package_type.
9 10 11 |
# File 'lib/gordon/options.rb', line 9 def package_type @package_type end |
#recipe ⇒ Object
Returns the value of attribute recipe.
5 6 7 |
# File 'lib/gordon/options.rb', line 5 def recipe @recipe end |
#runtime_name ⇒ Object
Returns the value of attribute runtime_name.
4 5 6 |
# File 'lib/gordon/options.rb', line 4 def runtime_name @runtime_name end |
#runtime_version ⇒ Object
Returns the value of attribute runtime_version.
4 5 6 |
# File 'lib/gordon/options.rb', line 4 def runtime_version @runtime_version end |
#trace ⇒ Object
Returns the value of attribute trace.
11 12 13 |
# File 'lib/gordon/options.rb', line 11 def trace @trace end |
#web_server_type ⇒ Object
Returns the value of attribute web_server_type.
7 8 9 |
# File 'lib/gordon/options.rb', line 7 def web_server_type @web_server_type end |
Class Method Details
.from(main_options, recipe) ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 |
# File 'lib/gordon/options.rb', line 13 def self.from(, recipe) self.new.tap do |opt| opt.app_type = .app_type || recipe['app_type'] opt.app_name = .app_name || recipe['app_name'] opt.app_description = .app_description || recipe['app_description'] opt.app_homepage = .app_homepage || recipe['app_homepage'] opt.app_version = .app_version || recipe['app_version'] opt.app_source = recipe['app_source'] || .app_source opt.app_source_excludes = (.app_source_excludes.to_a + recipe['app_source_excludes'].to_a).flatten opt.runtime_name = .runtime_name || recipe['runtime_name'] opt.runtime_version = .runtime_version || recipe['runtime_version'] opt.http_server_type = .http_server_type || recipe['http_server_type'] opt.web_server_type = .web_server_type || recipe['web_server_type'] opt.init_type = .init_type || recipe['init_type'] opt.package_type = .package_type || recipe['package_type'] opt.output_dir = recipe['output_dir'] || .output_dir opt.debug = !.debug.nil? ? .debug : recipe['debug'] opt.trace = !.trace.nil? ? .trace : recipe['trace'] end end |