Created
January 19, 2011 15:56
-
-
Save chad/786350 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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