module Easy::Configuration

Constants

VERSION

Public Class Methods

auth() { |Auth| ... } click to toggle source
# File lib/easy/configuration.rb, line 73
def auth(&block)
  if block_given?
    yield Auth
  else
    Auth
  end
end
custom() click to toggle source
# File lib/easy/configuration.rb, line 89
def custom
  @custom ||= Custom.new
end
entity(klass_or_name) { |_entities| ... } click to toggle source
# File lib/easy/configuration.rb, line 51
def entity(klass_or_name, &block)
  k = klass_or_name.is_a?(String) ? klass_or_name : klass_or_name.name.underscore

  self._entities[k] ||= Entity.new(k)

  if block_given?
    yield self._entities[k]
  else
    self._entities[k]
  end
end
host() click to toggle source
# File lib/easy/configuration.rb, line 47
def host
  "#{protocol}://#{host_name}"
end
menu(section) { |_menu| ... } click to toggle source
secrets() click to toggle source
# File lib/easy/configuration.rb, line 93
def secrets
  Rails.application.secrets
end
sites() click to toggle source
# File lib/easy/configuration.rb, line 81
def sites
  @sites ||= begin
    h = ::ActiveSupport::OrderedOptions.new
    h.merge!(secrets.sites || {})
    h
  end
end