Created
November 2, 2010 11:38
-
-
Save cheeyeo/659519 to your computer and use it in GitHub Desktop.
Using the singleton class of DifferentTextObject class without an Adapter object
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
diff_text_obj = DifferentTextObject.new(‘test’,’red’,10) | |
class << diff_text_obj | |
def text | |
@diff_text_obj.string | |
end | |
def colour | |
@diff_text_obj.color | |
end | |
def size_inches | |
@diff_text_obj.size_mm / 25.4 | |
end | |
end | |
Renderer.render(diff_text_obj) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment