Class: RubyNPM::Configuration
- Inherits:
-
Object
- Object
- RubyNPM::Configuration
- Defined in:
- lib/ruby_npm.rb
Instance Attribute Summary collapse
-
#binary ⇒ Object
Returns the value of attribute binary.
-
#logger ⇒ Object
Returns the value of attribute logger.
-
#options ⇒ Object
Returns the value of attribute options.
-
#stderr ⇒ Object
Returns the value of attribute stderr.
-
#stdin ⇒ Object
Returns the value of attribute stdin.
-
#stdout ⇒ Object
Returns the value of attribute stdout.
Instance Method Summary collapse
- #default_logger ⇒ Object
- #default_options ⇒ Object
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
65 66 67 68 69 70 71 72 |
# File 'lib/ruby_npm.rb', line 65 def initialize @binary = 'npm' @logger = default_logger @options = @stdin = nil @stdout = $stdout @stderr = $stderr end |
Instance Attribute Details
#binary ⇒ Object
Returns the value of attribute binary.
53 54 55 |
# File 'lib/ruby_npm.rb', line 53 def binary @binary end |
#logger ⇒ Object
Returns the value of attribute logger.
53 54 55 |
# File 'lib/ruby_npm.rb', line 53 def logger @logger end |
#options ⇒ Object
Returns the value of attribute options.
53 54 55 |
# File 'lib/ruby_npm.rb', line 53 def @options end |
#stderr ⇒ Object
Returns the value of attribute stderr.
53 54 55 |
# File 'lib/ruby_npm.rb', line 53 def stderr @stderr end |
#stdin ⇒ Object
Returns the value of attribute stdin.
53 54 55 |
# File 'lib/ruby_npm.rb', line 53 def stdin @stdin end |
#stdout ⇒ Object
Returns the value of attribute stdout.
53 54 55 |
# File 'lib/ruby_npm.rb', line 53 def stdout @stdout end |
Instance Method Details
#default_logger ⇒ Object
55 56 57 58 59 |
# File 'lib/ruby_npm.rb', line 55 def default_logger logger = Logger.new($stdout) logger.level = Logger::INFO logger end |
#default_options ⇒ Object
61 62 63 |
# File 'lib/ruby_npm.rb', line 61 def Options::Factory.new(Options::DEFINITIONS) end |