Created
January 7, 2013 10:15
-
-
Save anonymous/4473861 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 KeyMetrics | |
def initialize(date, day) | |
@@data = Metric.last(source: 'all', start_date: date, end_date: date) | |
p 'DATA' | |
p @@data | |
end | |
def find | |
{ | |
visits: @@data.visits.to_s, | |
revenue: CURRENCY + sdlw_data.transaction_revenue.to_s | |
} | |
end | |
end |
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
@today = KeyMetrics(TODAY, 'today').find |
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
<%= @today.visits %> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment