Class: Ichiban::SCSSFile

Inherits:
ProjectFile show all
Defined in:
lib/ichiban/project_file.rb

Instance Attribute Summary

Attributes inherited from ProjectFile

#abs, #rel

Instance Method Summary collapse

Methods inherited from ProjectFile

#dest, from_abs, #has_dest?, #initialize, register_type, #rel_to, #replace_ext

Constructor Details

This class inherits a constructor from Ichiban::ProjectFile

Instance Method Details

#dest_rel_to_compiledObject



142
143
144
145
146
147
# File 'lib/ichiban/project_file.rb', line 142

def dest_rel_to_compiled
  replace_ext(
    File.join('css', @rel.slice('assets/css/'.length..-1)),
    'css'
  )
end

#updateObject



149
150
151
152
153
# File 'lib/ichiban/project_file.rb', line 149

def update
  if Ichiban.config.scss_root_files.include?(rel_to('assets/css'))
    Ichiban::AssetCompiler.new(self).compile
  end
end