Class: Compass::Installers::Manifest
- Inherits:
-
Object
- Object
- Compass::Installers::Manifest
- Defined in:
- lib/compass/installers/manifest.rb
Defined Under Namespace
Classes: Entry
Class Method Summary collapse
Instance Method Summary collapse
-
#each ⇒ Object
Enumerates over the manifest files.
-
#initialize(manifest_file = nil) ⇒ Manifest
constructor
A new instance of Manifest.
Constructor Details
#initialize(manifest_file = nil) ⇒ Manifest
Returns a new instance of Manifest.
13 14 15 16 |
# File 'lib/compass/installers/manifest.rb', line 13 def initialize(manifest_file = nil) @entries = [] parse(manifest_file) if manifest_file end |
Class Method Details
.type(t) ⇒ Object
18 19 20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/compass/installers/manifest.rb', line 18 def self.type(t) eval " def \#{t}(from, options = {})\n @entries << Entry.new(:\#{t}, from, options)\n end\n def has_\#{t}?\n @entries.detect {|e| e.type == :\#{t}}\n end\n def each_\#{t}\n @entries.select {|e| e.type == :\#{t}}.each {|e| yield e}\n end\n END\nend\n" |
Instance Method Details
#each ⇒ Object
Enumerates over the manifest files
38 39 40 |
# File 'lib/compass/installers/manifest.rb', line 38 def each @entries.each {|e| yield e} end |