Class: Juvet::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/juvet/configuration.rb,
lib/juvet/configuration/adapter.rb,
lib/juvet/configuration/mapping.rb

Defined Under Namespace

Classes: Adapter, Mapping

Instance Method Summary collapse

Instance Method Details

#adapter(type = nil, options = nil) ⇒ Object



6
7
8
9
# File 'lib/juvet/configuration.rb', line 6

def adapter(type=nil, options=nil)
  return @adapter if type.nil?
  @adapter ||= Juvet::Configuration::Adapter.new(type, options)
end

#load!Object



15
16
17
# File 'lib/juvet/configuration.rb', line 15

def load!
  mapping.build adapter
end

#mapping(&block) ⇒ Object



11
12
13
# File 'lib/juvet/configuration.rb', line 11

def mapping(&block)
  @mapping ||= Juvet::Configuration::Mapping.new(&block)
end