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
<?xml version="1.0" encoding="UTF-8"?> | |
<!-- | |
Author: Miguel San Miguel contact at miguelsanmiguel dotcom | |
Based on 'haml.lang' by Ivan Kerin | |
--> | |
<language id="slim" _name="Slim" version="1.0" _section="Rails"> | |
<metadata> | |
<property name="mimetypes">text/x-slim</property> | |
<property name="globs">*.slim</property> | |
<property name="line-comment-start">/ </property> |
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 'benchmark' | |
class Dummy | |
@VALID_OPTIONS = :first, :last, :all | |
class << self | |
def when_find(*args) | |
case args.first | |
when *@VALID_OPTIONS |
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 'benchmark' | |
class Dummy | |
class << self | |
def when_find(*args) | |
case args.first | |
when :first, :last, :all | |
send(args.first) | |
else |