Class: Librarian::Lockfile::Compiler

Inherits:
Object
  • Object
show all
Defined in:
lib/librarian/lockfile/compiler.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(environment) ⇒ Compiler

Returns a new instance of Compiler.



8
9
10
# File 'lib/librarian/lockfile/compiler.rb', line 8

def initialize(environment)
  self.environment = environment
end

Instance Attribute Details

#environmentObject

Returns the value of attribute environment.



5
6
7
# File 'lib/librarian/lockfile/compiler.rb', line 5

def environment
  @environment
end

Instance Method Details

#compile(resolution) ⇒ Object



12
13
14
15
16
17
# File 'lib/librarian/lockfile/compiler.rb', line 12

def compile(resolution)
  out = StringIO.new
  save_sources(out, resolution.manifests)
  save_dependencies(out, resolution.dependencies)
  out.string
end