Class: Deliver::AppScreenshotValidator::ValidationError
- Inherits:
-
Object
- Object
- Deliver::AppScreenshotValidator::ValidationError
- Defined in:
- deliver/lib/deliver/app_screenshot_validator.rb
Overview
A simple structure that holds error information as well as formatted error messages consistently
Constant Summary collapse
- INVALID_SCREEN_SIZE =
Constants that can be given to
typeparam 'Invalid screen size'.freeze
- INVALID_FILE_EXTENSION =
'Invalid file extension'.freeze
- FILE_EXTENSION_MISMATCH =
'File extension mismatches its image format'.freeze
Instance Attribute Summary collapse
-
#debug_info ⇒ Object
readonly
Returns the value of attribute debug_info.
-
#path ⇒ Object
readonly
Returns the value of attribute path.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(type: nil, path: nil, debug_info: nil) ⇒ ValidationError
constructor
A new instance of ValidationError.
- #inspect ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(type: nil, path: nil, debug_info: nil) ⇒ ValidationError
14 15 16 17 18 |
# File 'deliver/lib/deliver/app_screenshot_validator.rb', line 14 def initialize(type: nil, path: nil, debug_info: nil) @type = type @path = path @debug_info = debug_info end |
Instance Attribute Details
#debug_info ⇒ Object (readonly)
Returns the value of attribute debug_info.
12 13 14 |
# File 'deliver/lib/deliver/app_screenshot_validator.rb', line 12 def debug_info @debug_info end |
#path ⇒ Object (readonly)
Returns the value of attribute path.
12 13 14 |
# File 'deliver/lib/deliver/app_screenshot_validator.rb', line 12 def path @path end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
12 13 14 |
# File 'deliver/lib/deliver/app_screenshot_validator.rb', line 12 def type @type end |
Instance Method Details
#inspect ⇒ Object
24 25 26 |
# File 'deliver/lib/deliver/app_screenshot_validator.rb', line 24 def inspect "\"#{type}\"" end |
#to_s ⇒ Object
20 21 22 |
# File 'deliver/lib/deliver/app_screenshot_validator.rb', line 20 def to_s "🚫 Error: #{path} - #{type} (#{debug_info})" end |