Class: Markdo::AddCommand
Instance Method Summary collapse
Methods inherited from Command
Constructor Details
This class inherits a constructor from Markdo::Command
Instance Method Details
#run(task) ⇒ Object
5 6 7 8 9 10 11 12 13 |
# File 'lib/markdo/add_command.rb', line 5 def run(task) task = String(task) unless task.strip.empty? File.open(inbox_path, 'a') do |file| file.puts(template(task)) end end end |