Skip to content

Instantly share code, notes, and snippets.

@scragz
scragz / .railsrc
Created March 31, 2011 22:55 — forked from janlelis/.railsrc
# .railsrc for Rails 3, encoding: utf-8
# see http://rbjl.net/49-railsrc-rails-console-snippets
if !Rails.application then warn "Rails isn't loaded, yet... skipping .railsrc" else
# # #
def ripl?; defined?(Ripl) && Ripl.instance_variable_get(:@shell); end
# # #
# loggers
<?php
class KST_Kitchen {
protected static $_appliances;
// Registers a loadable appliance and shortname for it
public function registerAppliance($shortname, $path, $class_name=false) {
if (array_key_exists($shortname, $_appliances)) {
// collision!
} else {
self::$_appliances[$shortname] = [];