Skip to content

Instantly share code, notes, and snippets.

@coatl
coatl / dci2.rb
Created February 15, 2010 11:08 — forked from deploy2/dci2.rb
def Context roles, verbs
lc_roles=roles.map{|role|
role.downcase.gsub("::","__")
}
sym_roles=lc_roles.map{|role|
":"+role
}.join(',')
at_roles=lc_roles.map{|role|
"@"+role
}
=begin
endless.rb is a pre-processor for ruby which allows you to use python-ish
indentation to delimit scopes, instead of having to type 'end' every time.
Basically, this makes the end keyword optional. If you leave off the
end, the preprocessor inserts an end for you at the next line indented
at or below the level of indentation of the line which started the scope.
End is optional, so you can still write things like this:
begin