Class: Vendorificator::Config
- Inherits:
-
Object
- Object
- Vendorificator::Config
- Extended by:
- Mixlib::Config
- Defined in:
- lib/vendorificator/config.rb
Instance Attribute Summary collapse
-
#environment ⇒ Object
Returns the value of attribute environment.
Class Method Summary collapse
Instance Attribute Details
#environment ⇒ Object
Returns the value of attribute environment.
9 10 11 |
# File 'lib/vendorificator/config.rb', line 9 def environment @environment end |
Class Method Details
.from_file(filename) ⇒ Object
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
# File 'lib/vendorificator/config.rb', line 17 def self.from_file(filename) pathname = Pathname.new(filename).cleanpath. self[:vendorfile_path] = pathname self[:root_dir] = if ( pathname.basename.to_s == 'vendor.rb' && pathname.dirname.basename.to_s == 'config' ) # Correctly recognize root dir if main config is 'config/vendor.rb' pathname.dirname.dirname else pathname.dirname end super(pathname.to_s) end |