Class: SamlSp::ConfigBlock

Inherits:
Object
  • Object
show all
Defined in:
lib/saml_sp/config.rb

Defined Under Namespace

Modules: ClassMethods

Constant Summary collapse

NOVAL_MARKER =
Object.new

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.inherited(subclass) ⇒ Object



19
20
21
# File 'lib/saml_sp/config.rb', line 19

def self.inherited(subclass)
  subclass.extend ClassMethods
end

Instance Method Details

#interpret(config_block, filename = nil) ⇒ Object

Interpret a config block.



7
8
9
10
11
12
13
14
15
16
17
# File 'lib/saml_sp/config.rb', line 7

def interpret(config_block, filename = nil)
  if filename
    instance_eval config_block, filename
  elsif config_block.respond_to? :call
    instance_eval &config_block
  else
    instance_eval config_block
  end
  
  self
end