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
$depth = 0 | |
at_exit { p depth: $depth } | |
def record_depth | |
$depth = caller.length-1 if caller.length-1 > $depth | |
end | |
require 'binding_of_caller' | |
module Torc | |
def torc(*args) |
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
# Conway's Game of Life | |
# 2015-09-18 | |
# by | |
# Nathan Hessler https://twitter.com/spune | |
# Adam Bachman https://twitter.com/abachman | |
# at Ruby DCamp 2015 http://rubydcamp.org/ | |
# awesome test library | |
def assert(value) | |
if !value |
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
require 'sinatra/base' | |
require 'minitest/autorun' | |
require 'minitest/spec' | |
require "rack/test" | |
require 'nokogiri' | |
class MyApp < Sinatra::Base | |
enable :inline_templates | |
get '/users/:id' do |