Module: ROM::Lotus

Defined in:
lib/rom-lotus.rb,
lib/rom/lotus/version.rb

Defined Under Namespace

Classes: Config

Constant Summary collapse

VERSION =
'0.1.0'.freeze

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.configObject (readonly)

Returns the value of attribute config.



9
10
11
# File 'lib/rom-lotus.rb', line 9

def config
  @config
end

Class Method Details

.setup(app) ⇒ Object



27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
# File 'lib/rom-lotus.rb', line 27

def self.setup(app)
  app.synchronize do
    @config = Config.new(app.configuration.root.join('../..').realpath)

    yield(@config)

    ROM.setup(config.repositories)

    %w(relations mappers commands).each do |component|
      Dir["#{config.root}/lib/*/#{component}/**/*.rb"].each do |file|
        require file
      end
    end

    ROM.finalize
  end
end