fattr icon indicating copy to clipboard operation
fattr copied to clipboard

More scaffolding.

Open johnmcconnell opened this issue 10 years ago • 1 comments

I have a very similar gem at https://github.com/johnmcconnell/attr_init. My goal is to slowly integrate with fattr functionality.

However, if you guys are open to it. I can add the functionality to the fattr gem. It is essentially have a class method accessor_struct, which templates the initializer and to_hash method.

class A
  accessor_struct :a, :b
end

a = A.new(a: 1, b: 2)
a.to_hash #=> {'a'=>1,'b'=>2}

johnmcconnell avatar Jan 26 '15 20:01 johnmcconnell

hello @ahoward ?

johnmcconnell avatar May 31 '15 15:05 johnmcconnell