Sha256: b5457e30917d8d4fe1aec051cb40bf096d60c8fbf55d702a99662f3f960cf9e4
Contents?: true
Size: 1.11 KB
Versions: 2
Compression:
Stored size: 1.11 KB
Contents
=begin This file determines if extlib or activesupport are already loaded, and then ensures the required objects and methods exist for Padrino to use. Required for Padrino to run: * Class#cattr_accessor * Module#alias_method_chain * String#inflectors (classify, underscore, camelize, etc) * Array#extract_options! * Object#blank? * Object#present? * Hash#slice, Hash#slice! * Hash#to_params * Hash#symbolize_keys, Hash.symbolize_keys! * Hash#reverse_merge, Hash#reverse_merge! * SupportLite::OrderedHash =end require 'i18n' # Load our locales I18n.load_path += Dir["#{File.dirname(__FILE__)}/locale/*.yml"] module Padrino # Return the current support used. # Can be one of: :extlib, :active_support def self.support @_padrino_support end end if defined?(Extlib) # load if already using extlib Padrino.instance_variable_set(:@_padrino_support, :extlib) require File.dirname(__FILE__) + '/support_lite/extlib_support' else # load active support by default Padrino.instance_variable_set(:@_padrino_support, :active_support) require File.dirname(__FILE__) + '/support_lite/as_support' end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
padrino-core-0.6.3 | lib/padrino-core/support_lite.rb |
padrino-core-0.6.2 | lib/padrino-core/support_lite.rb |