Class: UnimatrixCLI::Iris::StreamTransmutator::CreateCommand

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



17
18
19
20
21
22
23
24
25
26
27
28
29
30
# File 'lib/unimatrix_cli/iris/stream_transmutator/create_command.rb', line 17

def execute
  stream_transmutator = create_stream_transmutator

  if validate( stream_transmutator, 'Iris::StreamTransmutator' )
    write( 
      message: "StreamTransmutator uuid: #{ stream_transmutator.uuid }"
    )
  else
    write( 
      message: "Error creating stream_transmutator: #{ stream_transmutator.inspect }",
      error: true
    )
  end
end