class EacRubyUtils::ModuleAncestorsVariable::Base

def ancestors_variable

return [Hash]
def ancestors_variable
  the_module.ancestors.inject(initial_value.dup) do |a, e|
    if e.respond_to?(method_name, true)
      merge_operation(a, e.send(method_name).send(:self_variable))
    else
      a
    end
  end
end

def merge_operation(current, other)

Returns:
  • (Object) -

Parameters:
  • other (Object) --
  • current (Object) --
def merge_operation(current, other)
  current.merge(other)
end

def self_variable

Returns:
  • (Hash) -
def self_variable
  @self_variable ||= initial_value.dup
end