class Omnigollum::Config

Config class provides default values for omnigollum configuration, and an array of all providers which have been enabled if a omniauth config block is passed to eval_omniauth_config.

Attributes

default_options[RW]
default_options[RW]

Public Class Methods

new() click to toggle source
# File lib/omnigollum.rb, line 158
def initialize
  @default_options = self.class.default_options
end

Public Instance Methods

eval_omniauth_config(&block) click to toggle source

Evaluate procedure calls in an omniauth config block/proc in the context of this class.

This allows us to learn about omniauth config items that would otherwise be inaccessible.

block - Omniauth proc or block

# File lib/omnigollum.rb, line 176
def eval_omniauth_config(&block)
  self.instance_eval(&block)
end
method_missing(*args) click to toggle source

Catches missing methods we haven't implemented, but which omniauth accepts in its config block.

args - Arbitrary list of arguments

# File lib/omnigollum.rb, line 184
def method_missing(*args); end
provider(name, *args) click to toggle source

Register provider name

name - Provider symbol args - Arbitrary arguments

# File lib/omnigollum.rb, line 166
def provider(name, *args)
  @default_options[:provider_names].push name
end