Class: Params
- Inherits:
-
Object
- Object
- Params
- Defined in:
- lib/model/params.rb
Instance Attribute Summary collapse
-
#action ⇒ Object
readonly
attributes.
-
#architecture ⇒ Object
readonly
attributes.
-
#build_path ⇒ Object
readonly
attributes.
-
#configuration ⇒ Object
readonly
attributes.
-
#family ⇒ Object
readonly
attributes.
-
#log_file ⇒ Object
readonly
attributes.
-
#scheme ⇒ Object
readonly
attributes.
-
#sdk ⇒ Object
readonly
attributes.
-
#source_root ⇒ Object
readonly
attributes.
-
#target ⇒ Object
readonly
attributes.
-
#workspace ⇒ Object
readonly
attributes.
Instance Method Summary collapse
- #app_name ⇒ Object
-
#initialize ⇒ Params
constructor
A new instance of Params.
- #target? ⇒ Boolean
- #workspace? ⇒ Boolean
Constructor Details
#initialize ⇒ Params
Returns a new instance of Params.
16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/model/params.rb', line 16 def initialize set_defaults begin parse_action getoptlong = (getoptlong) set_log_file rescue StandardError=>error puts "\n#{error}\n#{usage}" exit 1 end end |
Instance Attribute Details
#action ⇒ Object (readonly)
attributes
10 11 12 |
# File 'lib/model/params.rb', line 10 def action @action end |
#architecture ⇒ Object (readonly)
attributes
10 11 12 |
# File 'lib/model/params.rb', line 10 def architecture @architecture end |
#build_path ⇒ Object (readonly)
attributes
10 11 12 |
# File 'lib/model/params.rb', line 10 def build_path @build_path end |
#configuration ⇒ Object (readonly)
attributes
10 11 12 |
# File 'lib/model/params.rb', line 10 def configuration @configuration end |
#family ⇒ Object (readonly)
attributes
10 11 12 |
# File 'lib/model/params.rb', line 10 def family @family end |
#log_file ⇒ Object (readonly)
attributes
10 11 12 |
# File 'lib/model/params.rb', line 10 def log_file @log_file end |
#scheme ⇒ Object (readonly)
attributes
10 11 12 |
# File 'lib/model/params.rb', line 10 def scheme @scheme end |
#sdk ⇒ Object (readonly)
attributes
10 11 12 |
# File 'lib/model/params.rb', line 10 def sdk @sdk end |
#source_root ⇒ Object (readonly)
attributes
10 11 12 |
# File 'lib/model/params.rb', line 10 def source_root @source_root end |
#target ⇒ Object (readonly)
attributes
10 11 12 |
# File 'lib/model/params.rb', line 10 def target @target end |
#workspace ⇒ Object (readonly)
attributes
10 11 12 |
# File 'lib/model/params.rb', line 10 def workspace @workspace end |
Instance Method Details
#app_name ⇒ Object
31 32 33 |
# File 'lib/model/params.rb', line 31 def app_name target? ? @target : @scheme end |
#target? ⇒ Boolean
39 40 41 |
# File 'lib/model/params.rb', line 39 def target? !@target.nil? end |
#workspace? ⇒ Boolean
35 36 37 |
# File 'lib/model/params.rb', line 35 def workspace? !@scheme.nil? && !@workspace.nil? end |