Class: Rake::AutoprefixerTasks

Inherits:
TaskLib
  • Object
show all
Defined in:
lib/rake/autoprefixer_tasks.rb

Overview

Define task to inspect Autoprefixer browsers, properties and values. Call it from your ‘Rakefile`:

AutoprefixerTasks.new(['> 1%', 'opera 12'])

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(browsers = []) ⇒ AutoprefixerTasks

Returns a new instance of AutoprefixerTasks.



31
32
33
34
35
# File 'lib/rake/autoprefixer_tasks.rb', line 31

def initialize(browsers = [])
  @browsers = browsers
  @compiler = AutoprefixerRails.compiler(@browsers)
  define
end

Instance Attribute Details

#browsersObject (readonly)

Returns the value of attribute browsers.



29
30
31
# File 'lib/rake/autoprefixer_tasks.rb', line 29

def browsers
  @browsers
end

Instance Method Details

#defineObject



37
38
39
40
41
42
43
44
# File 'lib/rake/autoprefixer_tasks.rb', line 37

def define
  namespace :autoprefixer do
    desc 'Show selected browsers and prefixed CSS properties and values'
    task :inspect do
      puts @compiler.inspect
    end
  end
end