Class: Solargraph::Convention::ActiveSupportConcern::ObjectProcessor

Inherits:
Object
  • Object
show all
Includes:
Logging
Defined in:
lib/solargraph/convention/active_support_concern.rb

Overview

Process an object to add any class methods brought in via ActiveSupport::Concern

Constant Summary

Constants included from Logging

Logging::DEFAULT_LOG_LEVEL, Logging::LOG_LEVELS

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Logging

logger

Constructor Details

#initialize(api_map, rooted_tag, scope, visibility, deep, skip) ⇒ ObjectProcessor

Returns a new instance of ObjectProcessor.

Parameters:

  • api_map (ApiMap)
  • rooted_tag (String)

    the tag of the class or module being processed

  • scope (Symbol)

    :class or :instance

  • visibility (Array<Symbol>)

    :public, :protected, and/or :private

  • deep (Boolean)

    whether to include methods from included modules

  • skip (Set<String>)

    a set of tags to skip



47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
# File 'lib/solargraph/convention/active_support_concern.rb', line 47

def initialize api_map, rooted_tag, scope, visibility, deep, skip
  @api_map = api_map
  @rooted_tag = rooted_tag
  @scope = scope
  @visibility = visibility
  @deep = deep
  @skip = skip

  @environ = Environ.new
  return unless scope == :class

  @rooted_type = ComplexType.parse(rooted_tag).force_rooted
  @fqns = rooted_type.namespace
  @namespace_pin = api_map.get_path_pins(fqns).select { |p| p.is_a?(Pin::Namespace) }.first

  api_map.get_includes(fqns).reverse.each do |include_tag|
    process_include include_tag
  end
end

Instance Attribute Details

#environObject (readonly)

Returns the value of attribute environ.



39
40
41
# File 'lib/solargraph/convention/active_support_concern.rb', line 39

def environ
  @environ
end