Class: XCAssetsCop::ConfigOptions

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

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_extensionObject (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_scaleObject (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_representationObject (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_nameObject (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_intentObject (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