Class: Npmdc::Config
- Inherits:
-
Object
- Object
- Npmdc::Config
- Defined in:
- lib/npmdc/config.rb
Constant Summary collapse
- DEPEPENDENCY_TYPES =
%w(dependencies devDependencies).freeze
- ENVIRONMENTS =
%w(development).freeze
Instance Attribute Summary collapse
-
#abort_on_failure ⇒ Object
Returns the value of attribute abort_on_failure.
-
#color ⇒ Object
Returns the value of attribute color.
-
#environments ⇒ Object
Returns the value of attribute environments.
-
#format ⇒ Object
Returns the value of attribute format.
-
#output ⇒ Object
Returns the value of attribute output.
- #path ⇒ Object
-
#types ⇒ Object
Returns the value of attribute types.
Instance Method Summary collapse
-
#initialize ⇒ Config
constructor
A new instance of Config.
- #path? ⇒ Boolean
Constructor Details
#initialize ⇒ Config
Returns a new instance of Config.
10 11 12 13 14 15 16 17 |
# File 'lib/npmdc/config.rb', line 10 def initialize @color = true @format = :short @output = STDOUT @types = DEPEPENDENCY_TYPES @environments = ENVIRONMENTS @abort_on_failure = false end |
Instance Attribute Details
#abort_on_failure ⇒ Object
Returns the value of attribute abort_on_failure.
6 7 8 |
# File 'lib/npmdc/config.rb', line 6 def abort_on_failure @abort_on_failure end |
#color ⇒ Object
Returns the value of attribute color.
6 7 8 |
# File 'lib/npmdc/config.rb', line 6 def color @color end |
#environments ⇒ Object
Returns the value of attribute environments.
6 7 8 |
# File 'lib/npmdc/config.rb', line 6 def environments @environments end |
#format ⇒ Object
Returns the value of attribute format.
6 7 8 |
# File 'lib/npmdc/config.rb', line 6 def format @format end |
#output ⇒ Object
Returns the value of attribute output.
6 7 8 |
# File 'lib/npmdc/config.rb', line 6 def output @output end |
#path ⇒ Object
19 20 21 |
# File 'lib/npmdc/config.rb', line 19 def path @path ||= Dir.pwd end |
#types ⇒ Object
Returns the value of attribute types.
6 7 8 |
# File 'lib/npmdc/config.rb', line 6 def types @types end |
Instance Method Details
#path? ⇒ Boolean
23 24 25 |
# File 'lib/npmdc/config.rb', line 23 def path? instance_variable_defined?(:@path) end |