module Ansei
Base module for Ansei
Constants
- VERSION
Current version number
Attributes
config[RW]
Public Class Methods
shehai()
click to toggle source
Build site from source files
# File lib/ansei.rb, line 23 def shehai set_config set_directories Shehai.new.build end
Protected Class Methods
set_config()
click to toggle source
Setup Ansei
with standard configuration
# File lib/ansei.rb, line 33 def set_config yaml = File.read("#{ANSEI_LIBRARY}/ansei.yml") yaml = Utils.string_to_yaml(yaml, false) yaml[:regex].each do |key, value| yaml[:regex][key] = Regexp.new(value) end @config = yaml end
set_directories()
click to toggle source
Set all of the working directories
# File lib/ansei.rb, line 45 def set_directories @config[:cwd] = Dir.pwd build = "#{config[:cwd]}/build" source = "#{config[:cwd]}/source" @config[:directories] = { build: build, javascript: ["#{source}/javascript", 'assets/js'], markdown: ["#{source}/markdown", ''], stylesheets: ["#{source}/stylesheets", 'assets/css'], templates: ["#{source}/templates", ''] } end