Class: Allen::Preprocessors::Preprocessor

Inherits:
Object
  • Object
show all
Extended by:
Rake::DSL
Defined in:
lib/allen/preprocessors.rb

Direct Known Subclasses

Banshee, Coyote, Null, Sass

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.name=(value) ⇒ Object Also known as: name

Sets the attribute name

Parameters:

  • value

    the value to set the attribute name to.



17
18
19
# File 'lib/allen/preprocessors.rb', line 17

def name=(value)
  @name = value
end

Class Method Details

.build(input, output) ⇒ Object



27
28
29
# File 'lib/allen/preprocessors.rb', line 27

def self.build(input, output)
  sh "#{@name} #{relative input}:#{relative output}"
end

.compress(input, output) ⇒ Object



31
32
33
# File 'lib/allen/preprocessors.rb', line 31

def self.compress(input, output)
  sh "#{@name} #{relative input}:#{relative output} --compress"
end

.relative(path) ⇒ Object



23
24
25
# File 'lib/allen/preprocessors.rb', line 23

def self.relative(path)
  path.gsub(Dir.pwd + '/',"")
end

.watch(input, output) ⇒ Object



35
36
37
# File 'lib/allen/preprocessors.rb', line 35

def self.watch(input, output)
  sh "#{@name} #{relative input}:#{relative output} --watch"
end