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 <<-END def #{t}(from, options = {}) @entries << Entry.new(:#{t}, from, options) end def has_#{t}? @entries.detect {|e| e.type == :#{t}} end def each_#{t} @entries.select {|e| e.type == :#{t}}.each {|e| yield e} end END end |
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 |