Class: Itly::ValidationResponse
- Inherits:
-
Object
- Object
- Itly::ValidationResponse
- Defined in:
- lib/itly/validation_response.rb
Overview
Contains the result of a validation
valid
: [True/False] indicating if the validation succeeded or failed plugin_id
: [String] an id identifying your plugin message
: [String] the message you want to appear in the logs in case of error
Instance Attribute Summary collapse
-
#message ⇒ Object
readonly
Returns the value of attribute message.
-
#plugin_id ⇒ Object
readonly
Returns the value of attribute plugin_id.
-
#valid ⇒ Object
readonly
Returns the value of attribute valid.
Instance Method Summary collapse
-
#initialize(valid:, plugin_id:, message: '') ⇒ ValidationResponse
constructor
Create a new ValidationResponse object.
-
#inspect ⇒ String
Inspect the object.
-
#to_s ⇒ String
Describe the object.
Constructor Details
#initialize(valid:, plugin_id:, message: '') ⇒ ValidationResponse
Create a new ValidationResponse object
17 18 19 20 21 |
# File 'lib/itly/validation_response.rb', line 17 def initialize(valid:, plugin_id:, message: '') @valid = valid @plugin_id = plugin_id @message = end |
Instance Attribute Details
#message ⇒ Object (readonly)
Returns the value of attribute message.
12 13 14 |
# File 'lib/itly/validation_response.rb', line 12 def @message end |
#plugin_id ⇒ Object (readonly)
Returns the value of attribute plugin_id.
12 13 14 |
# File 'lib/itly/validation_response.rb', line 12 def plugin_id @plugin_id end |
#valid ⇒ Object (readonly)
Returns the value of attribute valid.
12 13 14 |
# File 'lib/itly/validation_response.rb', line 12 def valid @valid end |
Instance Method Details
#inspect ⇒ String
Inspect the object
37 38 39 |
# File 'lib/itly/validation_response.rb', line 37 def inspect to_s end |
#to_s ⇒ String
Describe the object
28 29 30 |
# File 'lib/itly/validation_response.rb', line 28 def to_s "#<#{self.class.name}: valid: #{valid}, plugin_id: #{plugin_id}, message: #{}>" end |