Class: XCAssetsCop::ConfigOptions
- Inherits:
-
Object
- Object
- XCAssetsCop::ConfigOptions
- Defined in:
- lib/xcassetscop/config_options.rb
Constant Summary collapse
- ALLOWED_KEYS =
%i[ file_extension image_scale same_file_and_asset_name template_rendering_intent preserves_vector_representation ].freeze
Instance Attribute Summary collapse
-
#file_extension ⇒ Object
readonly
Returns the value of attribute file_extension.
-
#image_scale ⇒ Object
readonly
Returns the value of attribute image_scale.
-
#preserves_vector_representation ⇒ Object
readonly
Returns the value of attribute preserves_vector_representation.
-
#same_file_and_asset_name ⇒ Object
readonly
Returns the value of attribute same_file_and_asset_name.
-
#template_rendering_intent ⇒ Object
readonly
Returns the value of attribute template_rendering_intent.
Instance Method Summary collapse
-
#initialize(obj) ⇒ ConfigOptions
constructor
A new instance of ConfigOptions.
Constructor Details
#initialize(obj) ⇒ ConfigOptions
Returns a new instance of ConfigOptions.
20 21 22 23 24 25 26 27 |
# File 'lib/xcassetscop/config_options.rb', line 20 def initialize(obj) ensure_all_keys_are_allowed obj @file_extension = obj.sdig('file_extension') @image_scale = obj.sdig('image_scale') @same_file_and_asset_name = obj.sdig('same_file_and_asset_name') @template_rendering_intent = obj.sdig('template_rendering_intent') @preserves_vector_representation = obj.sdig('preserves_vector_representation') end |
Instance Attribute Details
#file_extension ⇒ Object (readonly)
Returns the value of attribute file_extension.
9 10 11 |
# File 'lib/xcassetscop/config_options.rb', line 9 def file_extension @file_extension end |
#image_scale ⇒ Object (readonly)
Returns the value of attribute image_scale.
9 10 11 |
# File 'lib/xcassetscop/config_options.rb', line 9 def image_scale @image_scale end |
#preserves_vector_representation ⇒ Object (readonly)
Returns the value of attribute preserves_vector_representation.
9 10 11 |
# File 'lib/xcassetscop/config_options.rb', line 9 def preserves_vector_representation @preserves_vector_representation end |
#same_file_and_asset_name ⇒ Object (readonly)
Returns the value of attribute same_file_and_asset_name.
9 10 11 |
# File 'lib/xcassetscop/config_options.rb', line 9 def same_file_and_asset_name @same_file_and_asset_name end |
#template_rendering_intent ⇒ Object (readonly)
Returns the value of attribute template_rendering_intent.
9 10 11 |
# File 'lib/xcassetscop/config_options.rb', line 9 def template_rendering_intent @template_rendering_intent end |