Class: ImagePack::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/image_pack/configuration.rb

Constant Summary collapse

SIZE_ATTRIBUTES =
%i[
  direct_input_threshold
  direct_pixel_threshold
  max_pixels
  max_output_size
  max_input_size
].freeze
INT_ATTRIBUTES =
%i[
  max_width
  max_height
].freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

Returns a new instance of Configuration.



27
28
29
30
31
32
33
34
35
36
# File 'lib/image_pack/configuration.rb', line 27

def initialize
  @execution              = :auto
  @direct_input_threshold = 128 * 1024
  @direct_pixel_threshold = 1 * 1024 * 1024
  @max_pixels             = 100_000_000
  @max_width              = 30_000
  @max_height             = 30_000
  @max_output_size        = 256 * 1024 * 1024
  @max_input_size         = 256 * 1024 * 1024
end

Instance Attribute Details

#direct_input_thresholdObject (readonly)

Returns the value of attribute direct_input_threshold.



18
19
20
# File 'lib/image_pack/configuration.rb', line 18

def direct_input_threshold
  @direct_input_threshold
end

#direct_pixel_thresholdObject (readonly)

Returns the value of attribute direct_pixel_threshold.



18
19
20
# File 'lib/image_pack/configuration.rb', line 18

def direct_pixel_threshold
  @direct_pixel_threshold
end

#executionObject

Returns the value of attribute execution.



18
19
20
# File 'lib/image_pack/configuration.rb', line 18

def execution
  @execution
end

#max_heightObject (readonly)

Returns the value of attribute max_height.



18
19
20
# File 'lib/image_pack/configuration.rb', line 18

def max_height
  @max_height
end

#max_input_sizeObject (readonly)

Returns the value of attribute max_input_size.



18
19
20
# File 'lib/image_pack/configuration.rb', line 18

def max_input_size
  @max_input_size
end

#max_output_sizeObject (readonly)

Returns the value of attribute max_output_size.



18
19
20
# File 'lib/image_pack/configuration.rb', line 18

def max_output_size
  @max_output_size
end

#max_pixelsObject (readonly)

Returns the value of attribute max_pixels.



18
19
20
# File 'lib/image_pack/configuration.rb', line 18

def max_pixels
  @max_pixels
end

#max_widthObject (readonly)

Returns the value of attribute max_width.



18
19
20
# File 'lib/image_pack/configuration.rb', line 18

def max_width
  @max_width
end