Class: Solargraph::Rspec::Correctors::Base Abstract

Inherits:
Object
  • Object
show all
Defined in:
lib/solargraph/rspec/correctors/base.rb

Overview

This class is abstract.

A corrector of RSpec parsed pins by Solargraph

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(namespace_pins:, rspec_walker:, added_pins: []) ⇒ Base

Returns a new instance of Base.

Parameters:

  • namespace_pins (Array<Solargraph::Pin::Base>)
  • rspec_walker (Solargraph::Rspec::SpecWalker)
  • added_pins (Array<Solargraph::Pin::Base>) (defaults to: [])


21
22
23
24
25
# File 'lib/solargraph/rspec/correctors/base.rb', line 21

def initialize(namespace_pins:, rspec_walker:, added_pins: [])
  @namespace_pins = namespace_pins
  @rspec_walker = rspec_walker
  @added_pins = added_pins
end

Instance Attribute Details

#added_pinsArray<Solargraph::Pin::Base] (readonly)

Returns Array<Solargraph::Pin::Base].

Returns:

  • (Array<Solargraph::Pin::Base])

    Array<Solargraph::Pin::Base]



16
17
18
# File 'lib/solargraph/rspec/correctors/base.rb', line 16

def added_pins
  @added_pins
end

#namespace_pinsArray<Solargraph::Pin::Namespace> (readonly)

Returns:

  • (Array<Solargraph::Pin::Namespace>)


10
11
12
# File 'lib/solargraph/rspec/correctors/base.rb', line 10

def namespace_pins
  @namespace_pins
end

#rspec_walkerSolargraph::Rspec::SpecWalker (readonly)



13
14
15
# File 'lib/solargraph/rspec/correctors/base.rb', line 13

def rspec_walker
  @rspec_walker
end

Instance Method Details

#correct(_source_map) ⇒ void

This method returns an undefined value.

Parameters:

  • _source_map (Solargraph::SourceMap)

Raises:

  • (NotImplementedError)


29
30
31
# File 'lib/solargraph/rspec/correctors/base.rb', line 29

def correct(_source_map)
  raise NotImplementedError
end