Skip to content

Instantly share code, notes, and snippets.

@dbrady
Created Jan 19, 2011
Embed
What would you like to do?
# One pattern I use so much I need to make an editor macro for it:
class Foo
attr_accessor :x, :y, :z, :w
# --> macro on above line should produce:
def initialize(x, y, z, w)
@x, @y, @z, @w = x, y, z, w
end
# --> end macro
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment