Created
June 27, 2012 18:23
-
-
Save r00k/3005856 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class User | |
def charge_for_subscription | |
PaymentActions.new(user, BraintreeGemSomethingSomething.new).charge_for_subscription | |
end | |
end | |
class PaymentActions | |
def initialize(user, braintree) | |
@user, @braintree = user, braintree | |
end | |
def charge_for_subscription | |
@braintree.create_subscription(@user) | |
end | |
end | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment