thank you for creating this library. I really enjoy to use it.
I've faced with the bug that pattr_initialize (as well as vattr_initialize and rattr_initialize methods) doesn't support default values for keyword arguments which were described in the attr_initialize notation for keyword arguments. I can check it in the Rails console
> class Test
> pattr_initialize [value: true]
> end
NameError: invalid attribute name `{:value=>true}'
...
BTW, when I'm using attr_initialize and att_private separately, it works correctly
> class Test
> attr_initialize [value: true]
> attr_private :value
>
* def test
> value.to_s
> end
> end
=> :test
> Test.new.test
=> "true"
> Test.new(value: 1).test
=> "1"
Hello 👋
thank you for creating this library. I really enjoy to use it.
I've faced with the bug that
pattr_initialize
(as well asvattr_initialize
andrattr_initialize
methods) doesn't support default values for keyword arguments which were described in theattr_initialize
notation for keyword arguments. I can check it in the Rails consoleBTW, when I'm using
attr_initialize
andatt_private
separately, it works correctly