Class: ShieldAst::AiAnalyzer
- Inherits:
-
Object
- Object
- ShieldAst::AiAnalyzer
- Defined in:
- lib/shield_ast/ai_analyzer.rb
Instance Attribute Summary collapse
-
#finding ⇒ Object
readonly
Returns the value of attribute finding.
-
#model_name ⇒ Object
readonly
Returns the value of attribute model_name.
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(finding) ⇒ AiAnalyzer
constructor
A new instance of AiAnalyzer.
Constructor Details
#initialize(finding) ⇒ AiAnalyzer
Returns a new instance of AiAnalyzer.
9 10 11 12 |
# File 'lib/shield_ast/ai_analyzer.rb', line 9 def initialize(finding) @model_name = ENV.fetch("GEMINI_MODEL", "gemini-2.5-flash") @finding = finding end |
Instance Attribute Details
#finding ⇒ Object (readonly)
Returns the value of attribute finding.
7 8 9 |
# File 'lib/shield_ast/ai_analyzer.rb', line 7 def finding @finding end |
#model_name ⇒ Object (readonly)
Returns the value of attribute model_name.
7 8 9 |
# File 'lib/shield_ast/ai_analyzer.rb', line 7 def model_name @model_name end |
Instance Method Details
#call ⇒ Object
14 15 16 |
# File 'lib/shield_ast/ai_analyzer.rb', line 14 def call check_for_false_positive end |