Class: R10K::Environment::Base
- Inherits:
-
Object
- Object
- R10K::Environment::Base
- Defined in:
- lib/r10k/environment/base.rb
Overview
This class defines a common interface for environment implementations.
Instance Attribute Summary collapse
- #basedir ⇒ Object readonly
- #dirname ⇒ Object readonly
- #name ⇒ Object readonly
Instance Method Summary collapse
-
#initialize(name, basedir, dirname, options = {}) ⇒ Base
constructor
Initialize the given environment.
-
#sync ⇒ void
abstract
Synchronize the given environment.
Constructor Details
#initialize(name, basedir, dirname, options = {}) ⇒ Base
Initialize the given environment.
25 26 27 28 29 30 31 32 |
# File 'lib/r10k/environment/base.rb', line 25 def initialize(name, basedir, dirname, = {}) @name = name @basedir = basedir @dirname = dirname @options = @full_path = File.join(@basedir, @dirname) end |
Instance Attribute Details
#basedir ⇒ Object (readonly)
12 13 14 |
# File 'lib/r10k/environment/base.rb', line 12 def basedir @basedir end |
#dirname ⇒ Object (readonly)
16 17 18 |
# File 'lib/r10k/environment/base.rb', line 16 def dirname @dirname end |
#name ⇒ Object (readonly)
8 9 10 |
# File 'lib/r10k/environment/base.rb', line 8 def name @name end |
Instance Method Details
#sync ⇒ void
This method is abstract.
This method returns an undefined value.
Synchronize the given environment.
39 40 41 |
# File 'lib/r10k/environment/base.rb', line 39 def sync raise NotImplementedError, "#{self.class} has not implemented method #{__method__}" end |