Class: Dependabot::Nuget::EvaluationDetails
- Inherits:
-
Object
- Object
- Dependabot::Nuget::EvaluationDetails
- Extended by:
- T::Sig
- Defined in:
- lib/dependabot/nuget/discovery/evaluation_details.rb
Instance Attribute Summary collapse
-
#error_message ⇒ Object
readonly
Returns the value of attribute error_message.
-
#evaluated_value ⇒ Object
readonly
Returns the value of attribute evaluated_value.
-
#original_value ⇒ Object
readonly
Returns the value of attribute original_value.
-
#result_type ⇒ Object
readonly
Returns the value of attribute result_type.
-
#root_property_name ⇒ Object
readonly
Returns the value of attribute root_property_name.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(result_type:, original_value:, evaluated_value:, root_property_name:, error_message:) ⇒ EvaluationDetails
constructor
A new instance of EvaluationDetails.
Constructor Details
#initialize(result_type:, original_value:, evaluated_value:, root_property_name:, error_message:) ⇒ EvaluationDetails
Returns a new instance of EvaluationDetails.
35 36 37 38 39 40 41 42 43 44 45 |
# File 'lib/dependabot/nuget/discovery/evaluation_details.rb', line 35 def initialize(result_type:, original_value:, evaluated_value:, root_property_name:, error_message:) @result_type = result_type @original_value = original_value @evaluated_value = evaluated_value @root_property_name = root_property_name @error_message = end |
Instance Attribute Details
#error_message ⇒ Object (readonly)
Returns the value of attribute error_message.
60 61 62 |
# File 'lib/dependabot/nuget/discovery/evaluation_details.rb', line 60 def @error_message end |
#evaluated_value ⇒ Object (readonly)
Returns the value of attribute evaluated_value.
54 55 56 |
# File 'lib/dependabot/nuget/discovery/evaluation_details.rb', line 54 def evaluated_value @evaluated_value end |
#original_value ⇒ Object (readonly)
Returns the value of attribute original_value.
51 52 53 |
# File 'lib/dependabot/nuget/discovery/evaluation_details.rb', line 51 def original_value @original_value end |
#result_type ⇒ Object (readonly)
Returns the value of attribute result_type.
48 49 50 |
# File 'lib/dependabot/nuget/discovery/evaluation_details.rb', line 48 def result_type @result_type end |
#root_property_name ⇒ Object (readonly)
Returns the value of attribute root_property_name.
57 58 59 |
# File 'lib/dependabot/nuget/discovery/evaluation_details.rb', line 57 def root_property_name @root_property_name end |
Class Method Details
.from_json(json) ⇒ Object
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/dependabot/nuget/discovery/evaluation_details.rb', line 12 def self.from_json(json) return nil if json.nil? result_type = T.let(json.fetch("ResultType"), String) original_value = T.let(json.fetch("OriginalValue"), String) evaluated_value = T.let(json.fetch("EvaluatedValue"), String) root_property_name = T.let(json.fetch("RootPropertyName", nil), T.nilable(String)) = T.let(json.fetch("ErrorMessage", nil), T.nilable(String)) EvaluationDetails.new(result_type: result_type, original_value: original_value, evaluated_value: evaluated_value, root_property_name: root_property_name, error_message: ) end |