Skip to content

Instantly share code, notes, and snippets.

@TrevMcKendrick
Created October 11, 2013 16:06
Show Gist options
  • Save TrevMcKendrick/6937457 to your computer and use it in GitHub Desktop.
Save TrevMcKendrick/6937457 to your computer and use it in GitHub Desktop.
#attr_name = "attributes"
class Person
def initialize(attr_name)
Person.class_eval {class << self; self end}.send(:attr_accessor,attr_name)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment