Class: Solargraph::Rspec::Config

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

Overview

Examples:

.solargraph.yml configuration for rspec

rspec:
  let_methods:
    - let_it_be

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(solargraph_config = Solargraph::Workspace::Config.new('./')) ⇒ Config

Returns a new instance of Config.



10
11
12
13
# File 'lib/solargraph/rspec/config.rb', line 10

def initialize(solargraph_config = Solargraph::Workspace::Config.new('./'))
  @solargraph_config = solargraph_config
  Solargraph.logger.debug "[RSpec] Solargraph config: #{raw_data}"
end

Instance Attribute Details

#solargraph_configSolargraph::Workspace::Config (readonly)

Returns:

  • (Solargraph::Workspace::Config)


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

def solargraph_config
  @solargraph_config
end

Instance Method Details

#example_methodsArray<Symbol>

Returns:

  • (Array<Symbol>)


24
25
26
# File 'lib/solargraph/rspec/config.rb', line 24

def example_methods
  (Rspec::EXAMPLE_METHODS + additional_example_methods).map(&:to_sym)
end

#let_methodsArray<Symbol>

Returns:

  • (Array<Symbol>)


19
20
21
# File 'lib/solargraph/rspec/config.rb', line 19

def let_methods
  (Rspec::LET_METHODS + additional_let_methods).map(&:to_sym)
end