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
## Contrived Example | |
# Will the thing float? | |
class Thing | |
attr_accessor :mass, :volume | |
def will_i_float? | |
(mass / volume) < 1 | |
end |
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
"appOptions": { | |
"appStoreUrl":"https://itunes.apple.com/us/app/app_name/idXXX", | |
"iosUrlScheme":"app_name://launchedfromthisappwiththeseoptions", | |
"androidAppID":"com.XXX.app_name", | |
"appName":"App Name" | |
} |
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
gotoExternalApp = function () { | |
var options = Environment.appOptions; | |
console.log ("Launching " + options.appName); | |
ExternalApp.launch(options); | |
}; | |
gotoExternalApp(); |
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
# | |
# The goal of this exercise is work on identifying abstraction which helps simplify, document, | |
# and separate the concerns going on in file. | |
# | |
# Exercise: | |
# * Find related ideas in the below code | |
# * Abstract them out (methods, modules, classes, etc, you pick!) | |
# * If you find multiple ways, then do a separate gist for each way. | |
# * Rinse repeat until you see no other ways. | |
# |
NewerOlder