Class: Bundler::Environment

Inherits:
Object
  • Object
show all
Defined in:
lib/bundler/environment.rb

Direct Known Subclasses

Installer, Runtime

Instance Attribute Summary (collapse)

Instance Method Summary (collapse)

Constructor Details

- (Environment) initialize(root, definition)



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

- (Object) root (readonly)

Returns the value of attribute root



3
4
5
# File 'lib/bundler/environment.rb', line 3

def root
  @root
end

Instance Method Details

- (Object) current_dependencies



29
30
31
# File 'lib/bundler/environment.rb', line 29

def current_dependencies
  @definition.current_dependencies
end

- (Object) dependencies



25
26
27
# File 'lib/bundler/environment.rb', line 25

def dependencies
  @definition.dependencies
end

- (Object) inspect



13
14
15
# File 'lib/bundler/environment.rb', line 13

def inspect
  @definition.to_lock.inspect
end

- (Object) lock



33
34
35
# File 'lib/bundler/environment.rb', line 33

def lock
  @definition.lock(Bundler.default_lockfile)
end

- (Object) requested_specs



17
18
19
# File 'lib/bundler/environment.rb', line 17

def requested_specs
  @definition.requested_specs
end

- (Object) specs



21
22
23
# File 'lib/bundler/environment.rb', line 21

def specs
  @definition.specs
end

- (Object) update(*gems)



37
38
39
# File 'lib/bundler/environment.rb', line 37

def update(*gems)
  # Nothing
end