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.
401 402 403 |
# File 'lib/devlog.rb', line 401 def initialize(zezzions) @all = zezzions.sort end |
Instance Attribute Details
#all ⇒ Object
Returns the value of attribute all.
395 396 397 |
# File 'lib/devlog.rb', line 395 def all @all end |
Instance Method Details
#begins_at ⇒ Object
405 406 407 |
# File 'lib/devlog.rb', line 405 def begins_at all.first.zzbegin.strftime("%Y/%m/%d") end |
#date ⇒ Object
413 414 415 |
# File 'lib/devlog.rb', line 413 def date DateTime.current.strftime("%Y/%m/%d") end |
#ends_at ⇒ Object
409 410 411 |
# File 'lib/devlog.rb', line 409 def ends_at all.last.zzend.strftime("%Y/%m/%d") end |