Method: Q_Environment#initialize
- Defined in:
- lib/q-language/environment.rb
#initialize(variables = {}, *implicit, object, options) ⇒ Q_Environment
Returns a new instance of Q_Environment.
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/q-language/environment.rb', line 7 def initialize (variables = {}, *implicit, object, ) @successful_methods = Hash.new {|h,k| h[k] = 0 } @failed_methods = Hash.new {|h,k| h[k] = 0 } @discarded_objects = Hash.new {|h,k| h[k] = 0 } @nodes_evaluated = Hash.new {|h,k| h[k] = 0 } @max_nodes = [0] @max_method_nodes = [1] @max_array_length = [2] @max_hash_length = [3] @max_string_length = [4] @variables = variables.to_hash @implicit = implicit @frame_stack = [object] @scope = { queue: [], method_stack: [], unassigned_variables: [], prev: nil } @method_results = [] end |