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
r@rs-MacBook-Pro ~ | |
$: curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.2/install.sh | bash | |
% Total % Received % Xferd Average Speed Time Time Time Current | |
Dload Upload Total Spent Left Speed | |
100 15916 100 15916 0 0 251k 0 --:--:-- --:--:-- --:--:-- 282k | |
=> Downloading nvm from git to '/Users/r/.nvm' | |
=> Cloning into '/Users/r/.nvm'... | |
remote: Enumerating objects: 356, done. | |
remote: Counting objects: 100% (356/356), done. | |
remote: Compressing objects: 100% (303/303), done. |
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
# lib file contents | |
Hash.class_eval do | |
# how the hell do we get this to work with [] | |
def recursive_find(key) | |
return self[key] if has_key?(key) | |
self | |
.values |
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
class Quiz | |
attr_accessor :questions, :correct, :incorrect | |
def initialize | |
self.questions = [] | |
end | |
def add_question(*args) | |
self.questions << Question.new(*args) | |
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
r@rhyss-mbp:~/git_repos/trainz$ rbenv local 2.2.0 | |
r@rhyss-mbp:~/git_repos/trainz$ ruby -v | |
ruby 2.2.0p0 (2014-12-25 revision 49005) [x86_64-darwin14] | |
r@rhyss-mbp:~/git_repos/trainz$ ruby trainz.rb | |
HERE#<App::TrainStatus:0x007fbfda84e5d0> | |
r@rhyss-mbp:~/git_repos/trainz$ rbenv local 2.2.1 | |
r@rhyss-mbp:~/git_repos/trainz$ ruby -v | |
ruby 2.2.1p85 (2015-02-26 revision 49769) [x86_64-darwin14] | |
r@rhyss-mbp:~/git_repos/trainz$ ruby trainz.rb | |
HERE#<App::TrainStatus:0x007fc00b127bb8> |