Sha256: ac28880ea08bcb35a26b38c0edf100456b2f2efe9d1602847d8600a2f361c008

Contents?: true

Size: 511 Bytes

Versions: 6

Compression:

Stored size: 511 Bytes

Contents

require 'logging'
require 'settingslogic'
Logging.init :devel, :debug, :response, :info, :warn, :error, :fatal

class ApplicationSettings < Settingslogic
  namespace RACK_ENV.to_s
  class << self
    def root=(value)
      instance[:app_root] = value
    end

    def root(*path)
      return File.expand_path(File.join(path), instance[:app_root]) if path
      instance[:app_root]
    end

    # @return [String]
    def api_absolute_url(uri)
      "#{api_root}#{uri}"
    end

    # @return [String]
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
grape-gen-0.0.6 template/config/settings.rb
grape-gen-0.0.5 template/config/settings.rb
grape-gen-0.0.4 template/config/settings.rb
grape-gen-0.0.3 template/config/settings.rb
grape-gen-0.0.2 template/config/settings.rb
grape-gen-0.0.1 template/config/settings.rb