attr_args_shorthand

Add to your Gemfile and bundle:

gem "attr_args_shorthand"

Add to your initializer:

class User
  def initialize(args)
    AttrArgsShorthand.set(self, args)
  end
end

Call getters and setters as your normally would:

user = User.new(name: "Kasper")
user.name #=> "Kasper"
user.name = "Christina"
user.name #=> "Christina"
user.instance_variable_get(:@name) #=> "Christina"

Contributing to attr_args_shorthand

Copyright © 2015 kaspernj. See LICENSE.txt for further details.