Module: XlsFunction::Evaluators::ArgumentsDefinable

Included in:
FunctionEvaluator
Defined in:
lib/xls_function/evaluators/arguments_definable.rb

Defined Under Namespace

Modules: ClassMethods

Class Method Summary collapse

Class Method Details

.included(klass) ⇒ Object



4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# File 'lib/xls_function/evaluators/arguments_definable.rb', line 4

def self.included(klass)
  klass.class_eval do
    class << self
      def arg_definitions
        @arg_definitions || []
      end

      def inherited(subclass)
        super
        subclass.instance_variable_set(:@arg_definitions, arg_definitions.dup)
      end
    end
  end

  klass.extend(ClassMethods)
end