Class: Sneaql::Core::Commands::SneaqlAssign

Inherits:
SneaqlCommand show all
Defined in:
lib/sneaql_lib/core.rb

Overview

assigns a session variable to a provided value

Instance Method Summary collapse

Methods inherited from SneaqlCommand

#initialize, #valid_expression?, #valid_operator?, #valid_recordset?, #valid_symbol?, #valid_variable?, #validate_args

Constructor Details

This class inherits a constructor from Sneaql::Core::SneaqlCommand

Instance Method Details

#action(var_name, value) ⇒ Object

Parameters:

  • var_name (String)
  • value (String)

    expression (must be a string)



24
25
26
27
28
# File 'lib/sneaql_lib/core.rb', line 24

def action(var_name, value)
  @expression_handler.set_session_variable(var_name, value)
rescue => e
  @exception_manager.pending_error = e
end

#arg_definitionObject

argument types



31
32
33
# File 'lib/sneaql_lib/core.rb', line 31

def arg_definition
  [:variable, :expression]
end