Class: Staticz::Manifest
- Inherits:
-
Object
- Object
- Staticz::Manifest
- Includes:
- Singleton
- Defined in:
- lib/manifest/manifest.rb
Instance Attribute Summary collapse
-
#elements ⇒ Object
readonly
Returns the value of attribute elements.
Class Method Summary collapse
Instance Method Summary collapse
- #build ⇒ Object
- #coffee(name) ⇒ Object
- #define(block) ⇒ Object
- #haml(name) ⇒ Object
-
#initialize ⇒ Manifest
constructor
A new instance of Manifest.
- #js(name) ⇒ Object
- #print ⇒ Object
- #sass(name) ⇒ Object
- #scss(name) ⇒ Object
- #sub(name, &block) ⇒ Object
Constructor Details
#initialize ⇒ Manifest
Returns a new instance of Manifest.
16 17 18 |
# File 'lib/manifest/manifest.rb', line 16 def initialize @elements = [] end |
Instance Attribute Details
#elements ⇒ Object (readonly)
Returns the value of attribute elements.
14 15 16 |
# File 'lib/manifest/manifest.rb', line 14 def elements @elements end |
Class Method Details
Instance Method Details
#build ⇒ Object
47 48 49 50 51 52 53 54 55 56 57 58 59 |
# File 'lib/manifest/manifest.rb', line 47 def build load "#{Dir.pwd}/manifest.rb" elements.each do |e| e.create_link_function end elements.each do |e| e.build end print end |
#coffee(name) ⇒ Object
43 44 45 |
# File 'lib/manifest/manifest.rb', line 43 def coffee(name) elements.push(Staticz::Cs.new(name)) end |
#define(block) ⇒ Object
65 66 67 68 |
# File 'lib/manifest/manifest.rb', line 65 def define(block) elements.clear instance_eval(&block) end |
#haml(name) ⇒ Object
27 28 29 |
# File 'lib/manifest/manifest.rb', line 27 def haml(name) elements.push(Staticz::Haml.new(name)) end |
#js(name) ⇒ Object
39 40 41 |
# File 'lib/manifest/manifest.rb', line 39 def js(name) elements.push(Staticz::Js.new(name)) end |
#print ⇒ Object
70 71 72 73 74 75 |
# File 'lib/manifest/manifest.rb', line 70 def print puts "Manifest:" elements.each do |e| e.print(0) end end |
#sass(name) ⇒ Object
31 32 33 |
# File 'lib/manifest/manifest.rb', line 31 def sass(name) elements.push(Staticz::Sass.new(name)) end |