Skip to content

Instantly share code, notes, and snippets.

@Bartuz
Created Nov 25, 2016
Embed
What would you like to do?
refactoring
#before
def initialize(options = {})
@type = options.fetch(:destination_type) { CARD_TO_CARD }
@options = options
end
#after
def initialize(destination_type: CARD_TO_CARD, **options)
@type = destination_type
@options = options
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment