I was hoping that accept_options could work with a Virtus.value_object, but it seems to be accepted only by Virtus::Attribute isn't it?
I tried to mixed them together and had an error like
ArgumentError: wrong number of arguments (2 for 0..1)
from ~/.rvm/gems/ruby-2.1.2@hsa/gems/virtus-1.0.3/lib/virtus/instance_methods.rb:16:in `initialize'
Not related with this PR
The following example doesn't work:
class NoisyString < Virtus::Attribute
def coerce(value)
coercer[value.class].to_string.upcase
end
end
Coverage increased (+0.14%) when pulling c42bcbfc271a2e17f9b655d9f726bea14667ee81 on nunommc:master into 51312f59dd0ba2e2f2678157055497142da308f9 on solnic:master.
@nunommc If you're still interested in getting accept_options to work with a Virtus.value_object, could you file a separate issue, with an example of what you're expecting?
I was hoping that
accept_options
could work with aVirtus.value_object
, but it seems to be accepted only byVirtus::Attribute
isn't it? I tried to mixed them together and had an error likeNot related with this PR The following example doesn't work: