Class: AutoprefixerRails::Result

Inherits:
Object
  • Object
show all
Defined in:
lib/autoprefixer-rails/result.rb

Overview

Container of prefixed CSS and source map with changes

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(css, map, warnings) ⇒ Result

Returns a new instance of Result.



13
14
15
16
17
# File 'lib/autoprefixer-rails/result.rb', line 13

def initialize(css, map, warnings)
  @warnings = warnings
  @css      = css
  @map      = map
end

Instance Attribute Details

#cssObject (readonly)

Prefixed CSS after Autoprefixer



5
6
7
# File 'lib/autoprefixer-rails/result.rb', line 5

def css
  @css
end

#mapObject (readonly)

Source map of changes



8
9
10
# File 'lib/autoprefixer-rails/result.rb', line 8

def map
  @map
end

#warningsObject (readonly)

Warnings from Autoprefixer



11
12
13
# File 'lib/autoprefixer-rails/result.rb', line 11

def warnings
  @warnings
end

Instance Method Details

#to_sObject

Stringify prefixed CSS



20
21
22
# File 'lib/autoprefixer-rails/result.rb', line 20

def to_s
  @css
end