Class: Evostream::Events::InStreamCreated

Inherits:
Event
  • Object
show all
Defined in:
lib/evostream/event/event/events/in_stream_created.rb

Overview

Action inStreamCreated

Instance Method Summary collapse

Methods inherited from Event

all_event, #class_name, descendants, #initialize

Constructor Details

This class inherits a constructor from Evostream::Events::Event

Instance Method Details

#executeObject



9
10
11
12
13
14
15
16
# File 'lib/evostream/event/event/events/in_stream_created.rb', line 9

def execute
  super do |type_flux|
    klass = "Evostream::Commands::Create#{type_flux.upcase}".constantize
    command = send(type_flux, type_flux)
    Evostream.logger 'Send command to server EvoStream'
    @result = Evostream.send_command(klass.new(command).cmd)
  end
end