Created
September 9, 2013 17:01
-
-
Save braidn/6498495 to your computer and use it in GitHub Desktop.
This file contains 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
module Quarterly | |
class ContributorsReport | |
class SubscriptionPlanPresenter < SimpleDelegator | |
def next_issue_number | |
product.available_on? ? super : "N/A" | |
end | |
def next_issue_ships_on | |
product.available_on? ? super : "N/A" | |
end | |
def next_issue_subscriber_count | |
return 0 unless product.available_on? | |
subscriptions.active(__getobj__.next_issue_ships_on).count | |
end | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment