Method: Springpad.add
- Defined in:
- lib/springpad.rb
.add(type, options) ⇒ Object
26 27 28 29 30 31 32 33 34 35 36 37 38 39 |
# File 'lib/springpad.rb', line 26 def self.add(type, ) cli = Springpad::CLI.new = {} .merge({:public => false}) if [:private] contents = cli.edit api = Springpad::API.new case type when "note" p api.add_note(contents, ) when "task" p api.add_task(contents, ) end end |