class Frozen::Site::Base

Attributes

site_root_path[RW]

Public Class Methods

new() click to toggle source
# File lib/frozen/site/base.rb, line 6
def initialize
  @options = {}
end

Public Instance Methods

build_path() click to toggle source
# File lib/frozen/site/base.rb, line 10
def build_path
  File.join(site_root_path, "build")
end
file_is_javascript?(file) click to toggle source
# File lib/frozen/site/base.rb, line 58
def file_is_javascript?(file)
  file =~ /^assets\/javascripts/
end
file_is_layout?(file) click to toggle source
# File lib/frozen/site/base.rb, line 50
def file_is_layout?(file)
  file =~ /^layouts/
end
file_is_stylesheet?(file) click to toggle source
# File lib/frozen/site/base.rb, line 54
def file_is_stylesheet?(file)
  file =~ /^assets\/stylesheets/
end
file_is_view?(file) click to toggle source
# File lib/frozen/site/base.rb, line 46
def file_is_view?(file)
  file =~ /^views/
end
files_in_path(path, ext) click to toggle source
# File lib/frozen/site/base.rb, line 66
def files_in_path(path, ext)
  files = []
  if ext.is_a? String
    files = Dir.glob(File.join(path, "/**/*.#{ext}"))
  end
  if ext.is_a? Array
    ext.each do |e|
      files += Dir.glob(File.join(path, "/**/*.#{e}"))
    end
  end
  if files
    files.delete_if { |i| File.basename(i) =~ /^\_/ }
  end
  files
end
image_build_path() click to toggle source
# File lib/frozen/site/base.rb, line 62
def image_build_path
  File.join(build_path, 'images')
end
image_template_path() click to toggle source
# File lib/frozen/site/base.rb, line 42
def image_template_path
  File.join(site_root_path, 'assets/images')
end
javascript_build_path() click to toggle source
# File lib/frozen/site/base.rb, line 34
def javascript_build_path
  File.join(build_path, "js")
end
javascript_template_path() click to toggle source
# File lib/frozen/site/base.rb, line 18
def javascript_template_path
  File.join(site_root_path, "assets/javascripts")
end
layout_template_path() click to toggle source
# File lib/frozen/site/base.rb, line 26
def layout_template_path
  File.join(site_root_path, "layouts")
end
stylesheet_build_path() click to toggle source
# File lib/frozen/site/base.rb, line 30
def stylesheet_build_path
  File.join(build_path, "css")
end
stylesheet_template_path() click to toggle source
# File lib/frozen/site/base.rb, line 14
def stylesheet_template_path
  File.join(site_root_path, "assets/stylesheets")
end
view_build_path() click to toggle source
# File lib/frozen/site/base.rb, line 38
def view_build_path
  site_root_path
end
view_template_path() click to toggle source
# File lib/frozen/site/base.rb, line 22
def view_template_path
  File.join(site_root_path, "views")
end