Class: Paymo::Extras
- Inherits:
-
Object
- Object
- Paymo::Extras
- Defined in:
- lib/paymo/extras.rb
Instance Method Summary collapse
- #earnt_this_month? ⇒ Boolean
- #earnt_this_week? ⇒ Boolean
- #earnt_today? ⇒ Boolean
-
#initialize(user_id) ⇒ Extras
constructor
A new instance of Extras.
Constructor Details
Instance Method Details
#earnt_this_month? ⇒ Boolean
20 21 22 |
# File 'lib/paymo/extras.rb', line 20 def earnt_this_month? run Time.new(Time.now.year, Time.now.month) end |
#earnt_this_week? ⇒ Boolean
15 16 17 18 |
# File 'lib/paymo/extras.rb', line 15 def earnt_this_week? start = Date.today + 1 - Date.today.wday run start.to_time end |
#earnt_today? ⇒ Boolean
11 12 13 |
# File 'lib/paymo/extras.rb', line 11 def earnt_today? run Date.today.to_time end |