Skip to content

Instantly share code, notes, and snippets.

@Solnse
Created April 28, 2014 21:26
Show Gist options
  • Save Solnse/11384542 to your computer and use it in GitHub Desktop.
Save Solnse/11384542 to your computer and use it in GitHub Desktop.
class Reward::Card
def initialize(params)
@type = params[:type]
@username = params[:username]
@password = params[:password]
end
def reward_balance
case @type
when "starbucks"
require 'card_types/starbucks'
self.card_balance
when "united"
require 'card_types/united'
self.card_balance
else
puts "it's not a rewards program I recognize."
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment