module Reality

Reality is library for accessing all world data, starting from Wikipedia.

Look at {Entity} for good starting point.

You also may want to navigate [Getting started](github.com/molybdenum-99/reality/wiki/Getting-started) page in our wiki.

Constants

MAJOR
MINOR
PATCH
VERSION

Public Class Methods

config() click to toggle source

@private

# File lib/reality/config.rb, line 36
def Reality.config
  @config ||= Config.new
end
configure(path) click to toggle source

Allows to configure Reality.

@param path [String] Path to config. See `config/demo.yml` for config

sample. Also, you can use `:demo` value for config Reality with
demo keys.
# File lib/reality/config.rb, line 46
def Reality.configure(path)
  if path == :demo
    config.load(File.expand_path('../../../config/demo.yml', __FILE__))
  else
    config.load(path)
  end
end
require_(*modules) click to toggle source

@private

# File lib/reality.rb, line 12
def self.require_(*modules)
  modules.flatten.flat_map{|pattern|
    Dir[File.expand_path("../reality/#{pattern}.rb", __FILE__)]
  }.each(&Kernel.method(:require))
end