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.



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

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

Instance Attribute Details

#browsersObject (readonly)

Returns the value of attribute browsers.



11
12
13
# File 'lib/rake/autoprefixer_tasks.rb', line 11

def browsers
  @browsers
end

Instance Method Details

#defineObject



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

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