Created
April 17, 2009 21:16
-
-
Save aeden/97265 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
module Poco | |
def field_id | |
@field_id ||= rand | |
end | |
def field_id=(field_id) | |
@field_id = field_id | |
end | |
end | |
Time.send(:include, Poco) | |
String.send(:include, Poco) | |
t = Time.now | |
puts t.field_id | |
puts t.is_a?(Time) | |
s = "chicken" | |
puts s.field_id | |
puts s.is_a?(String) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment