Skip to content

Instantly share code, notes, and snippets.

class ActionDispatch::Routing::Mapper
def draw(routes_name)
instance_eval(File.read(Rails.root.join("config/routes/#{routes_name}.rb")))
end
end
BCX::Application.routes.draw do
draw :api
draw :account
draw :session
@ambethia
ambethia / life.rb
Last active February 4, 2022 18:05
My implementation of Conway's Game of Life
# Run this:
# ruby < <(curl -s https://gist.githubusercontent.com/ambethia/1429621/raw/life.rb)
require 'curses'
class Life
extend Curses
CELL_CHAR = "*"