Wrapping a lower-level object, when you don't have the object to pass into the constructor.
Created
February 27, 2012 16:04
-
-
Save ericgj/1924971 to your computer and use it in GitHub Desktop.
Several things I learned this week: 27 Feb
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
1. Two different uses for DelegateClass [newman-scheduler] | |
2. Array() top-level function works on any Enumerable |
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
x = 'a' | |
y = %w[a b c] | |
z = (0..9) | |
Array(x) #=> ['a'] | |
Array(y) #=> ['a','b','c'] | |
Array(z) #=> [0,1,2,3,4,5,6,7,8,9] | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment