module RubyAPI
Constants
- BOOT_SCRIPT
- CONFIG_DIR
- CONFIG_FILE
- VERSION
Public Class Methods
application(root, overrides = {})
click to toggle source
# File lib/ruby_api.rb, line 24 def self.application(root, overrides = {}) @root = root Application.new(config(overrides)).boot end
config(overrides = {})
click to toggle source
# File lib/ruby_api.rb, line 29 def self.config(overrides = {}) path = overrides[:config_file] path ||= File.join CONFIG_DIR, CONFIG_FILE path = path(path) raise "Config missing at #{path}" unless File.exist?(path) Config.new YAML.load_file(path) end
development?()
click to toggle source
# File lib/ruby_api.rb, line 53 def self.development? %w[development test].include? environment end
environment()
click to toggle source
# File lib/ruby_api.rb, line 49 def self.environment ENV['RACK_ENV'] || 'development' end
path(path)
click to toggle source
# File lib/ruby_api.rb, line 45 def self.path(path) File.join @root, path end
root()
click to toggle source
# File lib/ruby_api.rb, line 41 def self.root @root end
root=(path)
click to toggle source
# File lib/ruby_api.rb, line 37 def self.root=(path) @root = path end