Class: ElfManifesto::ManifestMaker
- Inherits:
-
Object
- Object
- ElfManifesto::ManifestMaker
- Defined in:
- lib/elf_manifesto/manifest_maker.rb
Instance Attribute Summary collapse
-
#file_groups ⇒ Object
readonly
Returns the value of attribute file_groups.
-
#result ⇒ Object
readonly
Returns the value of attribute result.
Instance Method Summary collapse
-
#initialize(ops) ⇒ ManifestMaker
constructor
template-
String-> template file to load [properties]Hash-> arbitrary properties to supply to template [globs]Array-> list of file globs to evaluate.
Constructor Details
#initialize(ops) ⇒ ManifestMaker
template-
String-> template file to load
[properties] Hash -> arbitrary properties to supply to template [globs] Array -> list of file globs to evaluate
23 24 25 26 27 28 29 30 31 32 33 |
# File 'lib/elf_manifesto/manifest_maker.rb', line 23 def initialize(ops) @file_groups = get_file_groups(ops[:globs]) # evaluate the globs and create the file groups @file_groups[:props] = ops[:props] unless ops[:props].nil? template_file = File.open ops[:template], 'rb' @template = template_file.read @result = Mustache.render @template, @file_groups = "" pos = 1 # puts "#{message}\n\n\n" puts @result end |
Instance Attribute Details
#file_groups ⇒ Object (readonly)
Returns the value of attribute file_groups.
8 9 10 |
# File 'lib/elf_manifesto/manifest_maker.rb', line 8 def file_groups @file_groups end |
#result ⇒ Object (readonly)
Returns the value of attribute result.
8 9 10 |
# File 'lib/elf_manifesto/manifest_maker.rb', line 8 def result @result end |