Class: Markdo::AddCommand
- Defined in:
- lib/markdo/commands/add_command.rb
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/commands/add_command.rb', line 5 def run(task) task = String(task) unless task.strip.empty? File.open(data_source.inbox_path, 'a') do |file| file.puts(template(task)) end end end |