Class: Datacaster::Runtimes::UserContext

Inherits:
Base
  • Object
show all
Defined in:
lib/datacaster/runtimes/user_context.rb

Defined Under Namespace

Classes: ContextStruct

Instance Attribute Summary

Attributes inherited from Base

#reserved_instance_variables

Instance Method Summary collapse

Methods inherited from Base

#Failure, #Success, #after_call!, #before_call!, call, #inspect, #method_missing, not_found!, #respond_to_missing?, send_to_parent, #to_s

Constructor Details

#initialize(parent, user_context) ⇒ UserContext

Returns a new instance of UserContext.



43
44
45
46
47
48
# File 'lib/datacaster/runtimes/user_context.rb', line 43

def initialize(parent, user_context)
  super(parent)
  @context_struct = ContextStruct.new(user_context, self)

  @reserved_instance_variables += instance_variables
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Datacaster::Runtimes::Base

Instance Method Details

#contextObject



50
51
52
# File 'lib/datacaster/runtimes/user_context.rb', line 50

def context
  @context_struct
end