lib/rom.rb in rom-0.3.1 vs lib/rom.rb in rom-0.4.0
- old
+ new
@@ -8,19 +8,29 @@
require 'rom/header'
require 'rom/relation'
require 'rom/mapper'
require 'rom/reader'
+require 'rom/commands'
+
require 'rom/adapter'
require 'rom/repository'
require 'rom/env'
require 'rom/boot'
module ROM
EnvAlreadyFinalizedError = Class.new(StandardError)
+ CommandError = Class.new(StandardError)
+ TupleCountMismatchError = Class.new(CommandError)
+ InvalidOptionError = Class.new(StandardError) do
+ def initialize(option, valid_values)
+ super("#{option} should be one of #{valid_values.inspect}")
+ end
+ end
+
Schema = Class.new(Registry)
RelationRegistry = Class.new(Registry)
ReaderRegistry = Class.new(Registry)
# Starts the setup process for schema, relations and mappers
@@ -42,11 +52,11 @@
boot = Boot.new(repositories)
if block
boot.instance_exec(&block)
boot.finalize
+ else
+ boot
end
-
- boot
end
end