Class: RailsProof::AiTestPlanner
- Inherits:
-
Object
- Object
- RailsProof::AiTestPlanner
- Defined in:
- lib/rails_proof/ai_test_planner.rb
Defined Under Namespace
Classes: InvalidResponse
Constant Summary collapse
- VALID_KINDS =
%i[ coverage contract_check ].freeze
Instance Attribute Summary collapse
-
#class_name ⇒ Object
readonly
Returns the value of attribute class_name.
-
#client ⇒ Object
readonly
Returns the value of attribute client.
-
#deterministic_concerns ⇒ Object
readonly
Returns the value of attribute deterministic_concerns.
-
#existing_tests ⇒ Object
readonly
Returns the value of attribute existing_tests.
-
#source ⇒ Object
readonly
Returns the value of attribute source.
-
#target_type ⇒ Object
readonly
Returns the value of attribute target_type.
Instance Method Summary collapse
- #concerns ⇒ Object
- #context ⇒ Object
-
#initialize(target_type:, class_name:, source:, existing_tests:, deterministic_concerns:, client:) ⇒ AiTestPlanner
constructor
A new instance of AiTestPlanner.
Constructor Details
#initialize(target_type:, class_name:, source:, existing_tests:, deterministic_concerns:, client:) ⇒ AiTestPlanner
Returns a new instance of AiTestPlanner.
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
# File 'lib/rails_proof/ai_test_planner.rb', line 17 def initialize( target_type:, class_name:, source:, existing_tests:, deterministic_concerns:, client: ) @target_type = target_type @class_name = class_name @source = source @existing_tests = existing_tests @deterministic_concerns = deterministic_concerns @client = client end |
Instance Attribute Details
#class_name ⇒ Object (readonly)
Returns the value of attribute class_name.
10 11 12 |
# File 'lib/rails_proof/ai_test_planner.rb', line 10 def class_name @class_name end |
#client ⇒ Object (readonly)
Returns the value of attribute client.
10 11 12 |
# File 'lib/rails_proof/ai_test_planner.rb', line 10 def client @client end |
#deterministic_concerns ⇒ Object (readonly)
Returns the value of attribute deterministic_concerns.
10 11 12 |
# File 'lib/rails_proof/ai_test_planner.rb', line 10 def deterministic_concerns @deterministic_concerns end |
#existing_tests ⇒ Object (readonly)
Returns the value of attribute existing_tests.
10 11 12 |
# File 'lib/rails_proof/ai_test_planner.rb', line 10 def existing_tests @existing_tests end |
#source ⇒ Object (readonly)
Returns the value of attribute source.
10 11 12 |
# File 'lib/rails_proof/ai_test_planner.rb', line 10 def source @source end |
#target_type ⇒ Object (readonly)
Returns the value of attribute target_type.
10 11 12 |
# File 'lib/rails_proof/ai_test_planner.rb', line 10 def target_type @target_type end |
Instance Method Details
#concerns ⇒ Object
33 34 35 36 37 |
# File 'lib/rails_proof/ai_test_planner.rb', line 33 def concerns @concerns ||= suggestions.map do |suggestion| normalize_suggestion(suggestion) end end |
#context ⇒ Object
39 40 41 42 43 44 45 46 47 |
# File 'lib/rails_proof/ai_test_planner.rb', line 39 def context { target_type: target_type, class_name: class_name, source: source, existing_tests: existing_tests, deterministic_concerns: deterministic_concerns } end |