Class: Ribose::CLI::Commands::Space
- Defined in:
- lib/ribose/cli/commands/space.rb
Instance Method Summary collapse
Instance Method Details
#add ⇒ Object
27 28 29 30 |
# File 'lib/ribose/cli/commands/space.rb', line 27 def add space = Ribose::Space.create(**symbolize_keys()) say("New Space created! Id: " + space.id) end |
#list ⇒ Object
8 9 10 |
# File 'lib/ribose/cli/commands/space.rb', line 8 def list say(build_output(list_user_spaces, )) end |
#remove ⇒ Object
51 52 53 54 55 56 |
# File 'lib/ribose/cli/commands/space.rb', line 51 def remove remove_space() say("The Sapce has been removed!") rescue say("Please provide a valid Space UUID") end |
#show ⇒ Object
16 17 18 19 |
# File 'lib/ribose/cli/commands/space.rb', line 16 def show space = Ribose::Space.fetch([:space_id]) say(build_resource_output(space, )) end |
#update ⇒ Object
39 40 41 42 43 44 45 |
# File 'lib/ribose/cli/commands/space.rb', line 39 def update attributes = symbolize_keys() Ribose::Space.update(attributes.delete(:space_id), attributes) say("Your space has been updated!") rescue Ribose::UnprocessableEntity say("Something went wrong!, please check required attributes") end |