Skip to content

Instantly share code, notes, and snippets.

@chriseppstein
Created February 16, 2012 17:45
Show Gist options
  • Save chriseppstein/1846688 to your computer and use it in GitHub Desktop.
Save chriseppstein/1846688 to your computer and use it in GitHub Desktop.
evolution of a refactor -- it just kept getting simpler
def configure(&block)
self.tap do |config|
yield config
end
load_api
end
def configure(&block)
self.tap(&block)
load_api
end
def configure(&block)
yield self
load_api
end
def configure
yield self
load_api
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment