Sha256: c43dfa26705bfc50fc50d76fa1a28d67e34c788f1c4629a1299906a01c691cee
Contents?: true
Size: 806 Bytes
Versions: 2
Compression:
Stored size: 806 Bytes
Contents
require 'shapeable/version' require 'shapeable/configuration' require 'shapeable/shape' require 'shapeable/errors' require 'shapeable/extenders' module Shapeable CONFIG_FILE = './config/shapeable.rb' class << self attr_accessor :configuration_data def configure(file = nil) configuration if block_given? yield(configuration) else if File.exists?(CONFIG_FILE) file ||= CONFIG_FILE require file else raise ArgumentError, "Configure requires a block or the existance of a #{CONFIG_FILE} in your project" end end end def configuration self.configuration_data ||= Shapeable::Configuration.new end end end ActionController::Base.include Shapeable::Shape if defined? ActionController::Base
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
shapeable-0.7.1 | lib/shapeable.rb |
shapeable-0.7.0 | lib/shapeable.rb |