Class: Memo::Cli::Command::Today
- Inherits:
-
Object
- Object
- Memo::Cli::Command::Today
- Defined in:
- lib/memo/cli/command/today.rb
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(_, os: Memo::OS.new) ⇒ Today
constructor
A new instance of Today.
Constructor Details
#initialize(_, os: Memo::OS.new) ⇒ Today
Returns a new instance of Today.
7 8 9 10 11 12 13 14 |
# File 'lib/memo/cli/command/today.rb', line 7 def initialize( _, os: Memo::OS.new ) @os = os @config = Memo::Config.new @today = Memo::Today.new end |
Instance Method Details
#call ⇒ Object
16 17 18 19 |
# File 'lib/memo/cli/command/today.rb', line 16 def call @os.exec "mkdir -p #{@config.root}/#{@today.dir}" @os.exec "#{@config.editor} #{@config.root}/#{@today.fullpath}" end |