Class: Work::Md::Commands::Tyesterday

Inherits:
Object
  • Object
show all
Defined in:
lib/work/md/commands/tyesterday.rb

Class Method Summary collapse

Class Method Details

.execute(_argv = []) ⇒ Object



8
9
10
11
12
13
14
15
# File 'lib/work/md/commands/tyesterday.rb', line 8

def execute(_argv = [])
  file_names =
    [DateTime.now, Date.today.prev_day].map do |date|
      Work::Md::DateFile.create_if_not_exist(date)
    end

  Work::Md::File.open_in_editor(file_names)
end