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(params = {}) ⇒ AutoprefixerTasks

Returns a new instance of AutoprefixerTasks.



15
16
17
18
19
# File 'lib/rake/autoprefixer_tasks.rb', line 15

def initialize(params = {})
  @params    = params
  @processor = AutoprefixerRails.processor(@params)
  define
end

Instance Attribute Details

#browsersObject (readonly)

Returns the value of attribute browsers.



13
14
15
# File 'lib/rake/autoprefixer_tasks.rb', line 13

def browsers
  @browsers
end

Instance Method Details

#defineObject



21
22
23
24
25
26
27
28
# File 'lib/rake/autoprefixer_tasks.rb', line 21

def define
  namespace :autoprefixer do
    desc "Show selected browsers and prefixed CSS properties and values"
    task :info do
      puts @processor.info
    end
  end
end