class Clarion::Config
Attributes
options[R]
Public Class Methods
new(options={})
click to toggle source
# File lib/clarion/config.rb, line 16 def initialize(options={}) @options = options # Validation self.class.options.each do |m| send(m) end end
option(meth)
click to toggle source
# File lib/clarion/config.rb, line 7 def option(meth) options << meth end
options()
click to toggle source
# File lib/clarion/config.rb, line 11 def options @options ||= [] end
Public Instance Methods
app_id()
click to toggle source
# File lib/clarion/config.rb, line 35 def app_id @options[:app_id] end
authn_default_expires_in()
click to toggle source
# File lib/clarion/config.rb, line 31 def authn_default_expires_in @options.fetch(:authn_default_expires_in, 300).to_i end
counter()
click to toggle source
# File lib/clarion/config.rb, line 51 def counter if @options[:counter] @counter ||= Clarion::Counters.find(@options.fetch(:counter).fetch(:kind)).new(counter_options) end end
counter_options()
click to toggle source
# File lib/clarion/config.rb, line 57 def counter_options @counter_options ||= @options.fetch(:counter).dup.tap { |_| _.delete(:kind) } end
registration_allowed_url()
click to toggle source
# File lib/clarion/config.rb, line 27 def registration_allowed_url @options.fetch(:registration_allowed_url) end
rp_id()
click to toggle source
# File lib/clarion/config.rb, line 39 def rp_id @options[:rp_id] end
store()
click to toggle source
# File lib/clarion/config.rb, line 43 def store @store ||= Clarion::Stores.find(@options.fetch(:store).fetch(:kind)).new(store_options) end
store_options()
click to toggle source
# File lib/clarion/config.rb, line 47 def store_options @store_options ||= @options.fetch(:store).dup.tap { |_| _.delete(:kind) } end