Sha256: 1c6195f75bffa3135d329cbc44778f3f78c4eb770c4335888dec5e1c2a8c1961

Contents?: true

Size: 404 Bytes

Versions: 2

Compression:

Stored size: 404 Bytes

Contents

module Theme
  class << self
    def current_theme(env = nil)
      ::RefinerySetting[:theme]
    end

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

    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
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
refinerycms-theming-1.0.1 lib/theme.rb
refinerycms-theming-1.0.0 lib/theme.rb