Class: GitCompound::DSL::ManifestDSL
- Inherits:
-
Object
- Object
- GitCompound::DSL::ManifestDSL
- Defined in:
- lib/git_compound/dsl/manifest_dsl.rb
Overview
DSL for Manifest
Instance Method Summary collapse
- #component(name, &block) ⇒ Object
-
#initialize(manifest, contents) ⇒ ManifestDSL
constructor
A new instance of ManifestDSL.
- #maintainer(*component_maintainer) ⇒ Object
- #name(component_name) ⇒ Object
- #task(name, type = nil, &block) ⇒ Object
Constructor Details
#initialize(manifest, contents) ⇒ ManifestDSL
Returns a new instance of ManifestDSL.
8 9 10 11 |
# File 'lib/git_compound/dsl/manifest_dsl.rb', line 8 def initialize(manifest, contents) @manifest = manifest instance_eval(contents) end |
Instance Method Details
#component(name, &block) ⇒ Object
21 22 23 |
# File 'lib/git_compound/dsl/manifest_dsl.rb', line 21 def component(name, &block) @manifest.components.store(name.to_sym, Component.new(name, @manifest, &block)) end |
#maintainer(*component_maintainer) ⇒ Object
17 18 19 |
# File 'lib/git_compound/dsl/manifest_dsl.rb', line 17 def maintainer(*component_maintainer) @manifest.maintainer = component_maintainer end |
#name(component_name) ⇒ Object
13 14 15 |
# File 'lib/git_compound/dsl/manifest_dsl.rb', line 13 def name(component_name) @manifest.name = component_name.to_sym end |