Class: Memo::Today

Inherits:
Object
  • Object
show all
Defined in:
lib/memo/value/today.rb

Instance Method Summary collapse

Constructor Details

#initialize(config: Memo::Config.new) ⇒ Today

Returns a new instance of Today.



3
4
5
6
7
# File 'lib/memo/value/today.rb', line 3

def initialize(config: Memo::Config.new)
  @config = config
  @today = Date.today.to_s
  @year, @month, @day = @today.split("-")
end

Instance Method Details

#dirObject



9
# File 'lib/memo/value/today.rb', line 9

def dir = "#{@year}/#{@month}"

#fileObject



10
# File 'lib/memo/value/today.rb', line 10

def file = "#{@day}.#{@config.ext}"

#fullpathObject



11
# File 'lib/memo/value/today.rb', line 11

def fullpath = "#{dir}/#{file}"