Class: Memo::Today
- Inherits:
-
Object
- Object
- Memo::Today
- Defined in:
- lib/memo/value/today.rb
Instance Method Summary collapse
- #dir ⇒ Object
- #file ⇒ Object
- #fullpath ⇒ Object
-
#initialize(config: Memo::Config.new) ⇒ Today
constructor
A new instance of Today.
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
#dir ⇒ Object
9 |
# File 'lib/memo/value/today.rb', line 9 def dir = "#{@year}/#{@month}" |
#file ⇒ Object
10 |
# File 'lib/memo/value/today.rb', line 10 def file = "#{@day}.#{@config.ext}" |
#fullpath ⇒ Object
11 |
# File 'lib/memo/value/today.rb', line 11 def fullpath = "#{dir}/#{file}" |