Module: Theme

Defined in:
lib/theme.rb

Class Method Summary collapse

Class Method Details

.current_theme(env = nil) ⇒ Object



3
4
5
# File 'lib/theme.rb', line 3

def current_theme(env = nil)
  ::RefinerySetting[:theme]
end

.current_theme_dirObject



11
12
13
14
15
16
# File 'lib/theme.rb', line 11

def current_theme_dir
  theme = self.current_theme
  theme_dir = Rails.root.join("themes",theme)
  theme_dir = self.root.join('themes', theme) unless theme_dir.directory?
  theme_dir
end

.rootObject



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

def root
  Pathname.new( File.expand_path('../../', __FILE__) )
end