Class: Memo::Cli::Command::Edit
- Inherits:
-
Object
- Object
- Memo::Cli::Command::Edit
- Defined in:
- lib/memo/cli/command/edit.rb
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(options, os: Memo::OS.new) ⇒ Edit
constructor
A new instance of Edit.
Constructor Details
Instance Method Details
#call ⇒ Object
14 15 16 17 18 19 20 21 22 |
# File 'lib/memo/cli/command/edit.rb', line 14 def call filename = @options[0] namespace = @options.namespace file = Memo::File.new(filename, namespace) @os.exec "mkdir -p #{@config.root}/#{file.dir}" @os.exec "#{@config.editor} #{@config.root}/#{file.fullpath}" end |