Parent

Forgery

Constants

VERSION

Public Class Methods

Extend(object) click to toggle source
# File lib/forgery/extend.rb, line 2
def self.Extend(object)
  case object
  when Array
    Forgery::Extensions::Array.new(object)
  when Range
    Forgery::Extensions::Range.new(object.first, object.last, object.exclude_end?)
  when String
    Forgery::Extensions::String.new(object)
  else
    object
  end
end
dictionaries() click to toggle source
# File lib/forgery/forgery.rb, line 3
def self.dictionaries
  @@dictionaries ||= Dictionaries.new
end
formats() click to toggle source
# File lib/forgery/forgery.rb, line 7
def self.formats
  @@formats ||= Formats.new
end
load_from!(path) click to toggle source
# File lib/forgery/forgery.rb, line 15
def self.load_from!(path)
  self.load_paths << File.expand_path(path)
  Dir["#{self.load_paths.last}/**/*.rb"].uniq.each { |file| require file }
end
load_paths() click to toggle source
# File lib/forgery/forgery.rb, line 11
def self.load_paths
  @@load_paths ||= [File.dirname(__FILE__)]
end
rails?() click to toggle source
# File lib/forgery/forgery.rb, line 28
def self.rails?
  !rails_root.nil?
end
rails_root() click to toggle source
# File lib/forgery/forgery.rb, line 20
def self.rails_root
  if defined?(Rails) && Rails.respond_to?(:root)
    Rails.root.to_s
  elsif defined?(RAILS_ROOT)
    RAILS_ROOT
  end
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.