Skip to content

Instantly share code, notes, and snippets.

@chad
Created January 19, 2011 15:56
Show Gist options
  • Save chad/786350 to your computer and use it in GitHub Desktop.
Save chad/786350 to your computer and use it in GitHub Desktop.
module Names
# TODO
end
Object.send(:include, Names)
class Person
displayed_attribute :name
displayed_attribute :age
displayed_attribute :ssn, :label => "Social Security Number"
attr_accessor :foo
end
chad = Person.new
chad.age = 40
chad.name = "Chad Fowler"
chad.ssn = "444-222-1111"
puts chad.to_s
#"<Person age: 40, name: Chad Fowler, Social Security Number: 444-222-1111>"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment