Class: PGB::EvaluationContext

Inherits:
Object
  • Object
show all
Includes:
Shortcuts
Defined in:
lib/pgb/evaluation_context.rb

Instance Method Summary collapse

Methods included from Shortcuts

#[], #execute, #from, #func, #lit, #select

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(*args, **opts, &block) ⇒ Object

TODO Evaluate multiple args? TODO Implement respond_to_missing and remove cop skip? rubocop:disable Style/MissingRespondToMissing



10
11
12
13
14
15
16
# File 'lib/pgb/evaluation_context.rb', line 10

def method_missing(*args, **opts, &block)
  if args.one?
    Identifier.new(args.first)
  else
    super
  end
end