Class: PassByValueHandler

Inherits:
AbstractHandler show all
Defined in:
lib/hypertube-ruby-sdk/core/handler/pass_by_value_handler.rb

Instance Method Summary collapse

Methods inherited from AbstractHandler

#handle_command, #validate

Constructor Details

#initializePassByValueHandler

Returns a new instance of PassByValueHandler.



11
12
13
# File 'lib/hypertube-ruby-sdk/core/handler/pass_by_value_handler.rb', line 11

def initialize
  @required_parameters_count = 1
end

Instance Method Details

#process(command) ⇒ Object



15
16
17
18
19
# File 'lib/hypertube-ruby-sdk/core/handler/pass_by_value_handler.rb', line 15

def process(command)
  validate(command, @required_parameters_count, self.class.name)
  instance = command.payload[0]
  project_value(instance)
end