forked from lucasefe/themes_for_rails
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
reduced complexity of working with theme path
- Loading branch information
Showing
5 changed files
with
20 additions
and
69 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,30 @@ | ||
module ThemesForRails | ||
class Config | ||
|
||
attr_writer :base_dir, :themes_dir | ||
attr_writer :themes_dir #:base_dir, | ||
#attr_accessor :use_sass | ||
|
||
def initialize(&block) | ||
#@use_sass = true | ||
yield if block_given? | ||
end | ||
|
||
def base_dir | ||
@base_dir ||= Rails.root | ||
end | ||
#def base_dir | ||
# @base_dir ||= Rails.root | ||
#end | ||
|
||
def themes_dir | ||
@themes_dir ||= "app/themes" | ||
@themes_dir = File.join(Rails.root, @themes_dir) | ||
@themes_dir | ||
end | ||
|
||
def themes_path | ||
File.join(base_dir, themes_dir) | ||
end | ||
#def themes_path | ||
# File.join(Rails.root, themes_dir) | ||
#end | ||
|
||
def clear | ||
@base_dir = nil | ||
#@base_dir = nil | ||
@themes_dir = nil | ||
end | ||
|
||
#def use_sass? | ||
# @use_sass and sass_is_available? | ||
#end | ||
|
||
#def sass_is_available? | ||
# !!defined?(Sass::Plugin) | ||
#end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters