Class: Librarian::Lockfile::Compiler
- Inherits:
-
Object
- Object
- Librarian::Lockfile::Compiler
- Defined in:
- lib/librarian/lockfile/compiler.rb
Instance Attribute Summary collapse
-
#environment ⇒ Object
readonly
Returns the value of attribute environment.
Instance Method Summary collapse
- #compile(resolution) ⇒ Object
-
#initialize(environment) ⇒ Compiler
constructor
A new instance of Compiler.
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
#environment ⇒ Object
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 |