flash-gordon on or_nil-extension
flash-gordon on custom-builder-methods
flash-gordon on master
Support for custom builder meth… Merge pull request #415 from dr… (compare)
# system/boot/db.rb
Application.finalize(:db) do |container|
init do
require 'some/3rd/party/db'
container.register(:db, DB.configure(ENV['DB_URL']))
end
start do
db.establish_connection
end
stop do
db.close_connection
end
end
to_time = -> x { Time.iso8601("#{x}Z") }
ISOTime = Types::Strict::Time.constructor(to_time)
Schema = Dry::Validation.JSON do
optional(:sent_at, :time).value(ISOTime)
...
optional(:sent_at) { time? | value(ISOTime) }
?