Sha256: 87d347d20b9efff2d324affff08e3486f1bfafb603e314b701f4b8a1c6094ac9

Contents?: true

Size: 917 Bytes

Versions: 1

Compression:

Stored size: 917 Bytes

Contents

#
# Blogaze
# Copyright (C) 2011-2013 Jack Polgar
#
# Blogaze is released under the BSD 3-clause license.
# @license http://opensource.org/licenses/BSD-3-Clause
#

require 'ramaze'
require 'sequel'
require 'sequel/extensions/inflector'
require 'time-lord'
require "blogaze/version"
require "blogaze/theme"

module Blogaze
  class << self
    attr_accessor :root
    attr_accessor :database

    # Sets root and pushes it to Ramaze roots
    def root=(path)
      @root = path
      Ramaze.options.roots.push(path) if !Ramze.options.roots.include(path)
    end

    # Sets database and loads models
    def database=(database)
      @database = database
      require 'blogaze/models/init'
    end

    # Loads routes and controllers
    def start
      require 'blogaze/routes'
      require 'blogaze/controllers/init'
    end
  end
end

# wat
class Fixnum
  def ago_in_words
    Time.at(self).ago_in_words
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
blogaze-0.0.2 lib/blogaze.rb