Class: Bundler::Environment
- Inherits:
-
Object
- Object
- Bundler::Environment
- Defined in:
- lib/bundler/environment.rb
Instance Attribute Summary collapse
-
#root ⇒ Object
readonly
Returns the value of attribute root.
Instance Method Summary collapse
- #current_dependencies ⇒ Object
- #dependencies ⇒ Object
-
#index ⇒ Object
TODO: Remove this method.
-
#initialize(root, definition) ⇒ Environment
constructor
A new instance of Environment.
- #inspect ⇒ Object
- #lock ⇒ Object
- #requested_specs ⇒ Object
- #specs ⇒ Object
- #update(*gems) ⇒ Object
Constructor Details
#initialize(root, definition) ⇒ Environment
Returns a new instance of Environment.
5 6 7 8 9 10 11 |
# File 'lib/bundler/environment.rb', line 5 def initialize(root, definition) @root = root @definition = definition env_file = Bundler.app_config_path.join('environment.rb') env_file.rmtree if env_file.exist? end |
Instance Attribute Details
#root ⇒ Object (readonly)
Returns the value of attribute root.
3 4 5 |
# File 'lib/bundler/environment.rb', line 3 def root @root end |
Instance Method Details
#current_dependencies ⇒ Object
34 35 36 |
# File 'lib/bundler/environment.rb', line 34 def current_dependencies @definition.current_dependencies end |
#dependencies ⇒ Object
30 31 32 |
# File 'lib/bundler/environment.rb', line 30 def dependencies @definition.dependencies end |
#index ⇒ Object
TODO: Remove this method. It’s used in cli.rb still
18 19 20 |
# File 'lib/bundler/environment.rb', line 18 def index @definition.index end |
#inspect ⇒ Object
13 14 15 |
# File 'lib/bundler/environment.rb', line 13 def inspect @definition.to_lock.inspect end |
#lock ⇒ Object
38 39 40 |
# File 'lib/bundler/environment.rb', line 38 def lock @definition.lock(Bundler.default_lockfile) end |
#requested_specs ⇒ Object
22 23 24 |
# File 'lib/bundler/environment.rb', line 22 def requested_specs @definition.requested_specs end |
#specs ⇒ Object
26 27 28 |
# File 'lib/bundler/environment.rb', line 26 def specs @definition.specs end |
#update(*gems) ⇒ Object
42 43 44 |
# File 'lib/bundler/environment.rb', line 42 def update(*gems) # Nothing end |