Class: Ribose::CLI::Commands::Note
- Defined in:
- lib/ribose/cli/commands/note.rb
Instance Method Summary collapse
Instance Method Details
#add ⇒ Object
28 29 30 31 |
# File 'lib/ribose/cli/commands/note.rb', line 28 def add note = create_note() say("Note has been posted added! Id: " + note.id.to_s) end |
#list ⇒ Object
9 10 11 |
# File 'lib/ribose/cli/commands/note.rb', line 9 def list say(build_output(list_notes(), )) end |
#remove ⇒ Object
50 51 52 53 54 55 |
# File 'lib/ribose/cli/commands/note.rb', line 50 def remove remove_note() say("The note has been removed!") rescue say("Could not remove the specified note") end |
#show ⇒ Object
18 19 20 21 |
# File 'lib/ribose/cli/commands/note.rb', line 18 def show note = Ribose::Wiki.fetch([:space_id], [:note_id]) say(build_resource_output(note, )) end |
#update ⇒ Object
39 40 41 42 43 44 |
# File 'lib/ribose/cli/commands/note.rb', line 39 def update update_note() say("Your space note has been updated!") rescue Ribose::UnprocessableEntity say("Something went wrong!, please check required attributes") end |