Sha256: 2311ad3d3b384c838fbee9f97ffed0903392890a0177106ccb9dd50398121183
Contents?: true
Size: 583 Bytes
Versions: 17
Compression:
Stored size: 583 Bytes
Contents
class Forgery def self.dictionaries @@dictionaries ||= Dictionaries.new end def self.formats @@formats ||= Formats.new end def self.load_paths @@load_paths ||= [File.dirname(__FILE__)] end def self.load_from!(path) self.load_paths << File.expand_path(path) Dir["#{self.load_paths.last}/**/*.rb"].uniq.each { |file| require file } end def self.rails_root if defined?(Rails) && Rails.respond_to?(:root) Rails.root.to_s elsif defined?(RAILS_ROOT) RAILS_ROOT end end def self.rails? !rails_root.nil? end end
Version data entries
17 entries across 17 versions & 1 rubygems