Class: UnimatrixCLI::Alchemist::Video::CreateCommand

Inherits:
Command
  • Object
show all
Defined in:
lib/unimatrix_cli/alchemist/video/create_command.rb

Instance Method Summary collapse

Methods inherited from Command

available_commands, descendants, #initialize, #read_file, #validate, #validate_collection, #write

Methods included from UnimatrixParser

included

Constructor Details

This class inherits a constructor from UnimatrixCLI::Command

Instance Method Details

#executeObject



12
13
14
15
16
17
18
19
20
21
22
23
# File 'lib/unimatrix_cli/alchemist/video/create_command.rb', line 12

def execute
  video = create_video

  if validate( video, 'Alchemist::Video' )
    write( message: "Video uuid: #{ video.uuid }" )
  else
    write( 
      message: "Error creating video: #{ video.inspect }", 
      error: true 
    )
  end
end