Class: RspecSprint::Fixers::LetItBe::Candidate

Inherits:
Struct
  • Object
show all
Defined in:
lib/rspec_sprint/fixers/let_it_be/detector.rb

Overview

1 件の autocorrect 候補。let_name / factory_name は Symbol。kind は :let or :let_bang。

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(let_name:, factory_name:, line:, file_path:, kind: :let) ⇒ Candidate

Returns a new instance of Candidate.



11
12
13
# File 'lib/rspec_sprint/fixers/let_it_be/detector.rb', line 11

def initialize(let_name:, factory_name:, line:, file_path:, kind: :let)
  super
end

Instance Attribute Details

#factory_nameObject

Returns the value of attribute factory_name

Returns:

  • (Object)

    the current value of factory_name



9
10
11
# File 'lib/rspec_sprint/fixers/let_it_be/detector.rb', line 9

def factory_name
  @factory_name
end

#file_pathObject

Returns the value of attribute file_path

Returns:

  • (Object)

    the current value of file_path



9
10
11
# File 'lib/rspec_sprint/fixers/let_it_be/detector.rb', line 9

def file_path
  @file_path
end

#kindObject

Returns the value of attribute kind

Returns:

  • (Object)

    the current value of kind



9
10
11
# File 'lib/rspec_sprint/fixers/let_it_be/detector.rb', line 9

def kind
  @kind
end

#let_nameObject

Returns the value of attribute let_name

Returns:

  • (Object)

    the current value of let_name



9
10
11
# File 'lib/rspec_sprint/fixers/let_it_be/detector.rb', line 9

def let_name
  @let_name
end

#lineObject

Returns the value of attribute line

Returns:

  • (Object)

    the current value of line



9
10
11
# File 'lib/rspec_sprint/fixers/let_it_be/detector.rb', line 9

def line
  @line
end