Class: Devlog::Sevendays
- Inherits:
-
Object
- Object
- Devlog::Sevendays
- Includes:
- SevendaysTotal
- Defined in:
- lib/devlog.rb
Constant Summary collapse
- DAYS =
%i(monday tuesday wednesday thursday friday saturday sunday).freeze
- RANDOMDAY =
'Random'.freeze
Instance Attribute Summary collapse
-
#all ⇒ Object
Returns the value of attribute all.
Instance Method Summary collapse
- #begins_at ⇒ Object
- #date ⇒ Object
- #ends_at ⇒ Object
-
#initialize(zezzions) ⇒ Sevendays
constructor
A new instance of Sevendays.
Methods included from SevendaysTotal
#total_hours, #total_hours_string
Constructor Details
#initialize(zezzions) ⇒ Sevendays
Returns a new instance of Sevendays.
395 396 397 |
# File 'lib/devlog.rb', line 395 def initialize(zezzions) @all = zezzions.sort end |
Instance Attribute Details
#all ⇒ Object
Returns the value of attribute all.
389 390 391 |
# File 'lib/devlog.rb', line 389 def all @all end |
Instance Method Details
#begins_at ⇒ Object
399 400 401 |
# File 'lib/devlog.rb', line 399 def begins_at all.first.zzbegin.strftime("%Y/%m/%d") end |
#date ⇒ Object
407 408 409 |
# File 'lib/devlog.rb', line 407 def date DateTime.current.strftime("%Y/%m/%d") end |
#ends_at ⇒ Object
403 404 405 |
# File 'lib/devlog.rb', line 403 def ends_at all.last.zzend.strftime("%Y/%m/%d") end |