Skip to content

Instantly share code, notes, and snippets.

View swalberg's full-sized avatar

Sean Walberg swalberg

View GitHub Profile
[user]
name = Sean Walberg
email = [email protected]
[color]
ui = auto
[core]
editor = /usr/bin/vim
[alias]
co = checkout
ci = commit
class ActionController::Base
def self.check_signatures(key, *args)
before_filter lambda { check_signature(key)}, *args
end
def self.check_signature(key)
raise InvalidWebhookSignature
end
end
class Blah
def self.foo(&block)
bar
end
def bar(&block)
block.call("abc")
end
end
class MyClass
def self.blah(opts, &block)
result = somefunction(opts)
block.call(result)
end
end
class YourClass
def self.blah(opts)
result = somefunction(opts)