Class: Bundler::LockfileGenerator

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

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(definition) ⇒ LockfileGenerator

Returns a new instance of LockfileGenerator.



9
10
11
12
# File 'lib/bundler/lockfile_generator.rb', line 9

def initialize(definition)
  @definition = definition
  @out = String.new
end

Instance Attribute Details

#definitionObject (readonly)

Returns the value of attribute definition.



5
6
7
# File 'lib/bundler/lockfile_generator.rb', line 5

def definition
  @definition
end

#outObject (readonly)

Returns the value of attribute out.



6
7
8
# File 'lib/bundler/lockfile_generator.rb', line 6

def out
  @out
end

Class Method Details

.generate(definition) ⇒ Object



14
15
16
# File 'lib/bundler/lockfile_generator.rb', line 14

def self.generate(definition)
  new(definition).generate!
end

Instance Method Details

#generate!Object



18
19
20
21
22
23
24
25
26
# File 'lib/bundler/lockfile_generator.rb', line 18

def generate!
  add_sources
  add_platforms
  add_dependencies
  add_locked_ruby_version
  add_bundled_with

  out
end