Hello. I was trying to inject a dependency for my main slice action and was surprised to see that this can’t be done as you’ll get a FrozenError
stack dump when an HTTP PUT request is made. Example:
class Update < Main::Action
def initialize(now: Time.now.utc, **)
super(**)
@now = now
end
private
attr_reader :now
end
Is this expected behavior and are you not allowed to inject dependencies even though I’m ensuring all keyword arguments are passed upwards? Is the prescribed way to only inject dependencies via the Deps
container?
The documentation – unless I missed something – doesn’t necessarily say this is disallowed so curious to learn more.