Created
May 23, 2014 01:40
-
-
Save seangaffney/1400b07b4299f40da853 to your computer and use it in GitHub Desktop.
This file contains 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
DummyCourse = Struct.new(:title) do | |
def description | |
"Courses have been discontinued. This course contains all syllabi." | |
end | |
def published_for_ios | |
true | |
end | |
def created_at | |
nil | |
end | |
def updated_at | |
nil | |
end | |
# etc... | |
def read_attribute_for_serialization(attribute) | |
self.send(attribute) | |
end | |
end | |
course = DummyCourse.new("Course") | |
puts course | |
puts course.read_attribute_for_serialization(:published_for_ios) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment