Class: Staticz::Sass

Inherits:
Object
  • Object
show all
Includes:
Compilable
Defined in:
lib/manifest/sass.rb

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) ⇒ Sass

Returns a new instance of Sass.



15
16
17
# File 'lib/manifest/sass.rb', line 15

def initialize(name)
  @name = name
end

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



7
8
9
# File 'lib/manifest/sass.rb', line 7

def name
  @name
end

Instance Method Details

#buildObject



19
20
21
22
23
24
25
# File 'lib/manifest/sass.rb', line 19

def build
  if exists?
    engine = ::SassC::Engine.new(File.read(source_path), syntax: :sass, style: :compressed)

    File.write build_path, engine.render
  end
end

#build_file_endingObject



11
# File 'lib/manifest/sass.rb', line 11

def build_file_ending = "css"

#source_file_endingObject



9
# File 'lib/manifest/sass.rb', line 9

def source_file_ending = "sass"

#tile_type_nameObject



13
# File 'lib/manifest/sass.rb', line 13

def tile_type_name = "Sass"