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
145
146
147
|
# File 'lib/prez/assets.rb', line 145
def close
%{</style>}
end
|
#compile(contents) ⇒ Object
149
150
151
152
153
154
|
# File 'lib/prez/assets.rb', line 149
def compile(contents)
Sass::Engine.new(contents,
syntax: :scss,
style: :expanded,
load_paths: [File.dirname(file)]).render
end
|
#extension ⇒ Object
137
138
139
|
# File 'lib/prez/assets.rb', line 137
def extension
"css"
end
|
#minify(contents) ⇒ Object
156
157
158
159
160
161
|
# File 'lib/prez/assets.rb', line 156
def minify(contents)
Sass::Engine.new(contents,
syntax: :scss,
style: :compressed,
load_paths: [File.dirname(file)]).render
end
|
#open ⇒ Object
141
142
143
|
# File 'lib/prez/assets.rb', line 141
def open
%{<style type="text/css">}
end
|