Class: ConfigOMat::S3FallbackResponse
- Inherits:
-
ConfigItem
- Object
- ConfigItem
- ConfigOMat::S3FallbackResponse
- Defined in:
- lib/config_o_mat/shared/types.rb
Instance Attribute Summary collapse
-
#configuration_version ⇒ Object
readonly
Returns the value of attribute configuration_version.
-
#content ⇒ Object
readonly
Returns the value of attribute content.
-
#content_type ⇒ Object
readonly
Returns the value of attribute content_type.
Attributes inherited from ConfigItem
Instance Method Summary collapse
- #eql?(other) ⇒ Boolean
- #hash ⇒ Object
-
#initialize(content:, content_type:, configuration_version:) ⇒ S3FallbackResponse
constructor
A new instance of S3FallbackResponse.
- #validate ⇒ Object
Methods inherited from ConfigItem
#==, #error, #errors?, #validate!
Constructor Details
#initialize(content:, content_type:, configuration_version:) ⇒ S3FallbackResponse
Returns a new instance of S3FallbackResponse.
462 463 464 465 466 |
# File 'lib/config_o_mat/shared/types.rb', line 462 def initialize(content:, content_type:, configuration_version:) @content = content @content_type = content_type @configuration_version = configuration_version end |
Instance Attribute Details
#configuration_version ⇒ Object (readonly)
Returns the value of attribute configuration_version.
460 461 462 |
# File 'lib/config_o_mat/shared/types.rb', line 460 def configuration_version @configuration_version end |
#content ⇒ Object (readonly)
Returns the value of attribute content.
460 461 462 |
# File 'lib/config_o_mat/shared/types.rb', line 460 def content @content end |
#content_type ⇒ Object (readonly)
Returns the value of attribute content_type.
460 461 462 |
# File 'lib/config_o_mat/shared/types.rb', line 460 def content_type @content_type end |
Instance Method Details
#eql?(other) ⇒ Boolean
478 479 480 481 482 483 484 485 486 |
# File 'lib/config_o_mat/shared/types.rb', line 478 def eql?(other) return false if !super(other) if other.content != content || other.content_type != content_type || other.configuration_version != configuration_version return false end true end |
#hash ⇒ Object
474 475 476 |
# File 'lib/config_o_mat/shared/types.rb', line 474 def hash @content.hash ^ @content_type.hash ^ @configuration_version.hash end |
#validate ⇒ Object
468 469 470 471 472 |
# File 'lib/config_o_mat/shared/types.rb', line 468 def validate error :content, PRESENCE_ERROR_MSG if @content.nil? error :content_type, PRESENCE_ERROR_MSG if @content_type.nil? || @content_type.empty? error :configuration_version, PRESENCE_ERROR_MSG if @configuration_version.nil? || @configuration_version.empty? end |