Class: UnimatrixCLI::Alchemist::VideoEncoder::DescribeCommand

Inherits:
Command
  • Object
show all
Defined in:
lib/unimatrix_cli/alchemist/video_encoder/describe_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



11
12
13
14
15
16
17
18
19
20
21
22
23
24
# File 'lib/unimatrix_cli/alchemist/video_encoder/describe_command.rb', line 11

def execute
  video_encoder = find_video_encoder

  if validate( video_encoder, 'Alchemist::VideoEncoder' )
    parse_object( video_encoder ).each do | response | 
      write( message: response  )
    end
  else
    write( 
      message: "Video Encoder could not be found: #{ video_encoder.inspect }", 
      error: true 
    )
  end
end