Class: Solargraph::Pin::Reference::IncludedMixin

Inherits:
Reference
  • Object
show all
Defined in:
lib/solargraph/pin/reference/included_mixin.rb

Overview

A mixin that a module's self.included hook applies to every class that includes the module, e.g. base.extend ClassMethods. The closure is the hooking module and the name is the mixed-in module.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(keyword:, **splat) ⇒ IncludedMixin

Returns a new instance of IncludedMixin.

Parameters:

  • keyword (::Symbol) —

    :include, :prepend or :extend

  • splat (Hash{Symbol => Object})


15
16
17
18
# File 'lib/solargraph/pin/reference/included_mixin.rb', line 15

def initialize keyword:, **splat
  super(**splat)
  @keyword = keyword
end

Instance Attribute Details

#keyword ⇒ ::Symbol (readonly)

Returns :include, :prepend or :extend.

Returns:

  • (::Symbol) —

    :include, :prepend or :extend



11
12
13
# File 'lib/solargraph/pin/reference/included_mixin.rb', line 11

def keyword
  @keyword
end