Class: Gauguin::Configuration

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

Constant Summary collapse

DEFAULT_MAX_COLORS_COUNT =
10
DEFAULT_COLORS_LIMIT =
10000
DEFAULT_MIN_PERCENTAGE_SUM =
0.981
DEFAULT_COLOR_SIMILARITY_THRESHOLD =
25

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

Returns a new instance of Configuration.



33
34
35
36
37
38
# File 'lib/gauguin.rb', line 33

def initialize
  @max_colors_count = DEFAULT_MAX_COLORS_COUNT
  @colors_limit = DEFAULT_COLORS_LIMIT
  @min_percentage_sum = DEFAULT_MIN_PERCENTAGE_SUM
  @color_similarity_threshold = DEFAULT_COLOR_SIMILARITY_THRESHOLD
end

Instance Attribute Details

#color_similarity_thresholdObject

Returns the value of attribute color_similarity_threshold.



30
31
32
# File 'lib/gauguin.rb', line 30

def color_similarity_threshold
  @color_similarity_threshold
end

#colors_limitObject

Returns the value of attribute colors_limit.



30
31
32
# File 'lib/gauguin.rb', line 30

def colors_limit
  @colors_limit
end

#max_colors_countObject

Returns the value of attribute max_colors_count.



30
31
32
# File 'lib/gauguin.rb', line 30

def max_colors_count
  @max_colors_count
end

#min_percentage_sumObject

Returns the value of attribute min_percentage_sum.



30
31
32
# File 'lib/gauguin.rb', line 30

def min_percentage_sum
  @min_percentage_sum
end