Sha256: 8e22bd75dab103fb998fb2a2934c6376317572ff129f7e1a64b3996e57bf6c8a

Contents?: true

Size: 1.03 KB

Versions: 3

Compression:

Stored size: 1.03 KB

Contents

libdir = File.dirname(__FILE__)
$LOAD_PATH.unshift(libdir) unless $LOAD_PATH.include?(libdir)

require "massimo/helpers"
require "massimo/templates"
require "massimo/site"

module Massimo
  VERSION = File.read(File.expand_path("../../VERSION", __FILE__)) # :nodoc:
  
  MissingResource = Class.new(StandardError) # :nodoc:
  InvalidResource = Class.new(StandardError) # :nodoc:
  
  # This will create an instance of Massimo::Site the first time it is called.
  # Everytime it's called afterwords, without options, it returns the same
  # instance.
  def self.Site(options = {})
    return @site if defined?(@site) && options.empty?
    @site = Site.instance.setup(options)
  end
  
  # All the avaiable Resource types
  def self.resources
    @resources ||= []
  end
  
  # All the Resource types that are processable.
  def self.processable_resources
    resources.select { |resource| resource.processable? }
  end
end

require "massimo/resource/base"
require "massimo/view"
require "massimo/page"
require "massimo/stylesheet"
require "massimo/javascript"

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
massimo-0.4.6 lib/massimo.rb
massimo-0.4.5 lib/massimo.rb
massimo-0.4.4 lib/massimo.rb