class Nesta::Path
Public Class Methods
resolve_theme_path(theme)
click to toggle source
# File lib/nesta-contentfocus-extensions/path.rb, line 18 def self.resolve_theme_path(theme) theme_gemified?(theme).first if theme_gemified?(theme) end
theme_gemified?(theme)
click to toggle source
# File lib/nesta-contentfocus-extensions/path.rb, line 22 def self.theme_gemified?(theme) $LOADED_FEATURES.grep(/nesta-theme-#{theme}\.rb/) end
theme_loaded?(theme)
click to toggle source
# File lib/nesta-contentfocus-extensions/path.rb, line 26 def self.theme_loaded?(theme) Nesta::Config.theme && Nesta::Theme.const_defined?(theme.capitalize) end
themes(*args)
click to toggle source
# File lib/nesta-contentfocus-extensions/path.rb, line 8 def self.themes(*args) theme = args[0] if theme_loaded?(theme) && theme_gemified?(theme) theme_dir = resolve_theme_path(theme) File.expand_path(File.join(*args[1..-1]), theme_dir + '/../..') else pre_contentfocus_themes(*args) end end
Also aliased as: pre_contentfocus_themes