validateblock but this fails when the schema is used by other schemas due to dry-rb/dry-validation#361
It’s good that people are actually asking about dry-rb gems and they want to introduce monads and dry-types in their code. People are wondering how to persuade their teams.
I’m glad to see people who are interested in that
Actually, quite a lot of folks wanted to see some real-life open-source projects which use those examples.
I’m thinking it would be great to put a list of open-source projects using each of the gems on the main page
irb(main):001:0> require 'dry-monads' => true irb(main):002:0> Dry::Monads::Result NameError: uninitialized constant Dry::Monads::Result from (irb):2 from /Users/pawel/.rbenv/versions/2.4.1/bin/irb:11:in `<main>' irb(main):003:0> Dry::Monads::VERSION NameError: uninitialized constant Dry::Monads::VERSION from (irb):3 from /Users/pawel/.rbenv/versions/2.4.1/bin/irb:11:in `<main>' irb(main):004:0> Dry::Monads.constants => 
Would it be fair to say that this:
Import = Dry::AutoInject(MyContainer) class CreateUser include Import["users_repository"] def call(user_attrs) users_repository.create(user_attrs) end end
is syntactic sugar for this:
require 'users_repo' class CreateUser attr_reader :users_repo def initialize(users_repo: UsersRepo.new) @users_repo = users_repo end def call(user_attrs) users_repo.create(user_attrs) end end
Are there benefits beside the removal of boilerplate?