Skip to content

Instantly share code, notes, and snippets.

@airhorns
Created July 28, 2010 17:24
Show Gist options
  • Save airhorns/495422 to your computer and use it in GitHub Desktop.
Save airhorns/495422 to your computer and use it in GitHub Desktop.
def build_role(&block)
@role = Role.new
self.instance_eval &block if block_given?
r = @role
@role = nil
r
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment