Class: Allen::Preprocessors::Preprocessor
- Inherits:
-
Object
- Object
- Allen::Preprocessors::Preprocessor
- Extended by:
- Rake::DSL
- Defined in:
- lib/allen/preprocessors.rb
Class Attribute Summary collapse
-
.name ⇒ Object
(also: name)
Sets the attribute name.
Class Method Summary collapse
- .build(input, output) ⇒ Object
- .compress(input, output) ⇒ Object
- .relative(path) ⇒ Object
- .watch(input, output) ⇒ Object
Class Attribute Details
.name=(value) ⇒ Object Also known as: name
Sets the attribute name
16 17 18 |
# File 'lib/allen/preprocessors.rb', line 16 def name=(value) @name = value end |
Class Method Details
.build(input, output) ⇒ Object
26 27 28 |
# File 'lib/allen/preprocessors.rb', line 26 def self.build(input, output) sh "#{@name} #{relative input}:#{relative output}" end |
.compress(input, output) ⇒ Object
30 31 32 |
# File 'lib/allen/preprocessors.rb', line 30 def self.compress(input, output) sh "#{@name} #{relative input}:#{relative output} --compress" end |
.relative(path) ⇒ Object
22 23 24 |
# File 'lib/allen/preprocessors.rb', line 22 def self.relative(path) path.gsub(Dir.pwd + '/',"") end |
.watch(input, output) ⇒ Object
34 35 36 |
# File 'lib/allen/preprocessors.rb', line 34 def self.watch(input, output) sh "#{@name} #{relative input}:#{relative output} --watch" end |