Module: Jaina::Parser::Expression::Operator::Abstract::DSL::ClassInheritance Private

Defined in:
lib/jaina/parser/expression/operator/abstract/dsl.rb,
lib/jaina/parser/expression/operator/grouping/dsl.rb

Overview

This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.

Since:

  • 0.1.0

Instance Method Summary collapse

Instance Method Details

#inherited(child_klass) ⇒ void

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

This method returns an undefined value.

Parameters:

  • child_klass (Class)

Since:

  • 0.1.0



54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
# File 'lib/jaina/parser/expression/operator/abstract/dsl.rb', line 54

def inherited(child_klass)
  child_klass.instance_variable_set(
    :@token,
    instance_variable_get(:@token)
  )

  child_klass.instance_variable_set(
    :@precedence_level,
    instance_variable_get(:@precedence_level)
  )

  child_klass.instance_variable_set(
    :@associativity_direction,
    instance_variable_get(:@associativity_direction)
  )

  child_klass.instance_variable_set(
    :@acts_as_binary_term,
    instance_variable_get(:@acts_as_binary_term)
  )

  child_klass.instance_variable_set(
    :@acts_as_unary_term,
    instance_variable_get(:@acts_as_unary_term)
  )

  super
end