Class: Staticz::Scss
Instance Attribute Summary collapse
Instance Method Summary
collapse
Methods included from Compilable
#build_path, #create_link_function, #exists?, #path, #path_method_name, #print, #source_path, #valid
Constructor Details
#initialize(name) ⇒ Scss
Returns a new instance of Scss.
15
16
17
|
# File 'lib/manifest/scss.rb', line 15
def initialize(name)
@name = name
end
|
Instance Attribute Details
#name ⇒ Object
Returns the value of attribute name.
7
8
9
|
# File 'lib/manifest/scss.rb', line 7
def name
@name
end
|
Instance Method Details
#build ⇒ Object
19
20
21
22
23
24
25
|
# File 'lib/manifest/scss.rb', line 19
def build
if exists?
engine = ::SassC::Engine.new(File.read(source_path), syntax: :scss, style: :compressed)
File.write build_path, engine.render
end
end
|
#build_file_ending ⇒ Object
11
|
# File 'lib/manifest/scss.rb', line 11
def build_file_ending = "css"
|
#source_file_ending ⇒ Object
9
|
# File 'lib/manifest/scss.rb', line 9
def source_file_ending = "scss"
|
#tile_type_name ⇒ Object
13
|
# File 'lib/manifest/scss.rb', line 13
def tile_type_name = "Scss"
|