Class: Prez::Assets::Stylesheet
Instance Attribute Summary
Attributes inherited from Tagged
#contents, #file, #name, #options
Instance Method Summary
collapse
Methods inherited from Tagged
#compiled_contents, #dev?, #initialize, #minified_contents, #self_closing?, #to_tag
Instance Method Details
#close ⇒ Object
149
150
151
|
# File 'lib/prez/assets.rb', line 149
def close
%{</style>}
end
|
#compile(contents) ⇒ Object
153
154
155
156
157
158
|
# File 'lib/prez/assets.rb', line 153
def compile(contents)
Sass::Engine.new(contents,
syntax: :scss,
style: :expanded,
load_paths: [File.dirname(file)]).render
end
|
#extension ⇒ Object
141
142
143
|
# File 'lib/prez/assets.rb', line 141
def extension
"css"
end
|
#minify(contents) ⇒ Object
160
161
162
163
164
165
|
# File 'lib/prez/assets.rb', line 160
def minify(contents)
Sass::Engine.new(contents,
syntax: :scss,
style: :compressed,
load_paths: [File.dirname(file)]).render
end
|
#open ⇒ Object
145
146
147
|
# File 'lib/prez/assets.rb', line 145
def open
%{<style type="text/css">}
end
|