class Smooth::Configuration

Public Class Methods

method_missing(meth, *args, &block) click to toggle source
# File lib/smooth/configuration.rb, line 76
def self.method_missing(meth, *args, &block)
  instance.send(meth, *args, &block)
end

Public Instance Methods

active_record() click to toggle source
# File lib/smooth/configuration.rb, line 45
def active_record
  return active_record_config if active_record_config.is_a?(Hash)
  file = root.join(active_record_config)
  fail 'The config file does not exist at ' + file.to_s unless file.exist?
  YAML.load(file.open).fetch(Smooth.env)
end
app_folder_paths() click to toggle source
# File lib/smooth/configuration.rb, line 60
def app_folder_paths
  Array(definition_folders).map { |f| root.join(f) }
end
enable_event_tracking?() click to toggle source
# File lib/smooth/configuration.rb, line 52
def enable_event_tracking?
  !!@@enable_events
end
method_missing(meth, *args, &block) click to toggle source
Calls superclass method
# File lib/smooth/configuration.rb, line 68
def method_missing(meth, *args, &block)
  if meth.to_s.match(/(\w+)\?$/)
    !!(send(Regexp.last_match[1], *args, &block)) if respond_to?(Regexp.last_match[1])
  else
    super
  end
end
models_path() click to toggle source
# File lib/smooth/configuration.rb, line 64
def models_path
  root.join(@@models_path)
end
root() click to toggle source
# File lib/smooth/configuration.rb, line 56
def root
  Pathname(@@root)
end