Class: Juvet::Configuration::Mapping

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

Instance Method Summary collapse

Constructor Details

#initialize(&block) ⇒ Mapping

Returns a new instance of Mapping.



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

def initialize(&block)
  @block = block
end

Instance Method Details

#build(adapter) ⇒ Object



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

def build(adapter)
  mapper = Juvet::Mapper.new &@block
  mapper.build(adapter)
  mapper
end