Sha256: 4bcbad37a112f80bd2dd91ed7c56a615de574da6cc258b633ba9b550c5758d14
Contents?: true
Size: 593 Bytes
Versions: 1
Compression:
Stored size: 593 Bytes
Contents
require_relative '../lib/simple_configuration' class Application extend SimpleConfiguration config :root_path config :supported_formats, %i(json xml) config(:authentication) { |_| false } end class AdminApplication < Application root_path '/admin' supported_formats %i(html) authentication { |request| AdminAuthentication.(request) } end class ApiApplication < Application root_path '/' authentication { |request| request.headers[:api_key] = ENV['API_KEY'] } end class DashboardApplication < Application root_path '/dashboard' authentication { |_| true } end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
simple_configuration-0.1.0 | examples/app_example.rb |