Next-gen ruby libs! » github.com/dry-rb » website: https://dry-rb.org » forum: https://discourse.dry-rb.org
Cell.()
#call
. In this arrangement, you don't need to throw away your objects, and it works nicely with tools like dry-auto_inject.
include
line in the view class. i was wondering if that is the desired way of using it, @timriley ? in my world, the view shouldn't know anything about user repos?
in cells, the goal is to have views such as
%h1
= header
= avatar
.body
= body_text
where the cell instance makes it as simple as possible to deliver the data for the logic-less view. that's basically it
class SomeView < ...
include Container[:userrepo]
call
would accept runtime params and new
would support auto-injection
userrepo
?
human_readable_name
or something that's needed in both.user_repo
dependency would be defined in two places?
gimme_some_data
is redundant in the view and the json-view
?
Types::Strict::Bool | Types::Strict::Int | Types::Strict::String
Sum
instead of Sum::Constrained