Class: Genit::Css
- Inherits:
-
Object
- Object
- Genit::Css
- Defined in:
- lib/genit/project/css.rb
Overview
Deals with the styles directory.
Instance Method Summary collapse
-
#initialize(working_dir) ⇒ Css
constructor
Public: Constructor.
-
#render ⇒ Object
Public: Render css in the styles directory.
Constructor Details
#initialize(working_dir) ⇒ Css
Public: Constructor.
working_dir - The String working directory, where live the project.
13 14 15 |
# File 'lib/genit/project/css.rb', line 13 def initialize working_dir @working_dir = working_dir end |
Instance Method Details
#render ⇒ Object
Public: Render css in the styles directory.
Returns nothing.
20 21 22 23 24 25 26 27 28 29 |
# File 'lib/genit/project/css.rb', line 20 def render Dir.glob(File.join(@working_dir, STYLES_DIR, '**/*')) do |filename| @filename = filename if @filename.end_with?(".sass") render_sass :sass elsif @filename.end_with?(".scss") render_sass :scss end end end |