Skip to content

Instantly share code, notes, and snippets.

@swalberg
Created May 6, 2011 20:23
Show Gist options
  • Save swalberg/959713 to your computer and use it in GitHub Desktop.
Save swalberg/959713 to your computer and use it in GitHub Desktop.
class MyClass
def self.blah(opts, &block)
result = somefunction(opts)
block.call(result)
end
end
class YourClass
def self.blah(opts)
result = somefunction(opts)
end
end
myresults = nil
MyClass.blah(opts) do |foo|
myresults = foo
end
yourresults = Yourclass.blah(opts)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment