Class: OpenFeature::GoFeatureFlag::OfrepApiResponse
- Inherits:
-
Object
- Object
- OpenFeature::GoFeatureFlag::OfrepApiResponse
- Defined in:
- lib/openfeature/go-feature-flag/model/ofrep_api_response.rb
Instance Attribute Summary collapse
-
#error_code ⇒ Object
readonly
Returns the value of attribute error_code.
-
#error_details ⇒ Object
readonly
Returns the value of attribute error_details.
-
#key ⇒ Object
readonly
Returns the value of attribute key.
-
#metadata ⇒ Object
readonly
Returns the value of attribute metadata.
-
#reason ⇒ Object
readonly
Returns the value of attribute reason.
-
#value ⇒ Object
readonly
Returns the value of attribute value.
-
#variant ⇒ Object
readonly
Returns the value of attribute variant.
Instance Method Summary collapse
- #eql?(other) ⇒ Boolean
- #has_error? ⇒ Boolean
-
#initialize(value:, key:, reason:, variant:, error_code:, error_details:, metadata:) ⇒ OfrepApiResponse
constructor
A new instance of OfrepApiResponse.
Constructor Details
#initialize(value:, key:, reason:, variant:, error_code:, error_details:, metadata:) ⇒ OfrepApiResponse
Returns a new instance of OfrepApiResponse.
6 7 8 9 10 11 12 13 14 |
# File 'lib/openfeature/go-feature-flag/model/ofrep_api_response.rb', line 6 def initialize(value:, key:, reason:, variant:, error_code:, error_details:, metadata:) @value = value @key = key @reason = reason @variant = variant @error_code = error_code @error_details = error_details @metadata = end |
Instance Attribute Details
#error_code ⇒ Object (readonly)
Returns the value of attribute error_code.
4 5 6 |
# File 'lib/openfeature/go-feature-flag/model/ofrep_api_response.rb', line 4 def error_code @error_code end |
#error_details ⇒ Object (readonly)
Returns the value of attribute error_details.
4 5 6 |
# File 'lib/openfeature/go-feature-flag/model/ofrep_api_response.rb', line 4 def error_details @error_details end |
#key ⇒ Object (readonly)
Returns the value of attribute key.
4 5 6 |
# File 'lib/openfeature/go-feature-flag/model/ofrep_api_response.rb', line 4 def key @key end |
#metadata ⇒ Object (readonly)
Returns the value of attribute metadata.
4 5 6 |
# File 'lib/openfeature/go-feature-flag/model/ofrep_api_response.rb', line 4 def @metadata end |
#reason ⇒ Object (readonly)
Returns the value of attribute reason.
4 5 6 |
# File 'lib/openfeature/go-feature-flag/model/ofrep_api_response.rb', line 4 def reason @reason end |
#value ⇒ Object (readonly)
Returns the value of attribute value.
4 5 6 |
# File 'lib/openfeature/go-feature-flag/model/ofrep_api_response.rb', line 4 def value @value end |
#variant ⇒ Object (readonly)
Returns the value of attribute variant.
4 5 6 |
# File 'lib/openfeature/go-feature-flag/model/ofrep_api_response.rb', line 4 def variant @variant end |
Instance Method Details
#eql?(other) ⇒ Boolean
20 21 22 23 24 25 26 27 28 29 |
# File 'lib/openfeature/go-feature-flag/model/ofrep_api_response.rb', line 20 def eql?(other) return false unless other.is_a?(OpenFeature::GoFeatureFlag::OfrepApiResponse) key == other.key && value == other.value && reason == other.reason && variant == other.variant && error_code == other.error_code && error_details == other.error_details && == other. end |
#has_error? ⇒ Boolean
16 17 18 |
# File 'lib/openfeature/go-feature-flag/model/ofrep_api_response.rb', line 16 def has_error? !@error_code.nil? && !@error_code.empty? end |