Class: Kumi::Core::Analyzer::Plans::Scope

Inherits:
Struct
  • Object
show all
Defined in:
lib/kumi/core/analyzer/plans.rb

Overview

Scope plan: defines the dimensional execution context for a declaration

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(scope: [], lifts: [], join_hint: nil, arg_shapes: {}) ⇒ Scope

Returns a new instance of Scope.



12
13
14
15
# File 'lib/kumi/core/analyzer/plans.rb', line 12

def initialize(scope: [], lifts: [], join_hint: nil, arg_shapes: {})
  super
  freeze
end

Instance Attribute Details

#arg_shapesObject

Returns the value of attribute arg_shapes

Returns:

  • (Object)

    the current value of arg_shapes



11
12
13
# File 'lib/kumi/core/analyzer/plans.rb', line 11

def arg_shapes
  @arg_shapes
end

#join_hintObject

Returns the value of attribute join_hint

Returns:

  • (Object)

    the current value of join_hint



11
12
13
# File 'lib/kumi/core/analyzer/plans.rb', line 11

def join_hint
  @join_hint
end

#liftsObject

Returns the value of attribute lifts

Returns:

  • (Object)

    the current value of lifts



11
12
13
# File 'lib/kumi/core/analyzer/plans.rb', line 11

def lifts
  @lifts
end

#scopeObject

Returns the value of attribute scope

Returns:

  • (Object)

    the current value of scope



11
12
13
# File 'lib/kumi/core/analyzer/plans.rb', line 11

def scope
  @scope
end

Instance Method Details

#depthObject



17
18
19
# File 'lib/kumi/core/analyzer/plans.rb', line 17

def depth
  scope.size
end

#scalar?Boolean

Returns:

  • (Boolean)


21
22
23
# File 'lib/kumi/core/analyzer/plans.rb', line 21

def scalar?
  scope.empty?
end