Created
July 11, 2013 13:26
-
-
Save statwonk/5975418 to your computer and use it in GitHub Desktop.
Modularization of monthly statistics scripts.
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 MonthlyStats | |
class MonthTime | |
def initialize | |
@begin_time = '2013-06-01' | |
@end_time = '2013-06-30' | |
end | |
def count_code_challenges | |
puts CodeChallenges.count | |
end | |
end | |
end | |
mh = MonthlyStats::MonthTime.new | |
mh.count_code_challenges |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Command line: RUBY_ENV=data rails runner foo.rb
gives the following: