Sha256: 31ea7ce4319db5bb275645f843afad14700395cdb329ee5d6be2fb644ebd4f1f
Contents?: true
Size: 1.11 KB
Versions: 1
Compression:
Stored size: 1.11 KB
Contents
# frozen_string_literal: true require 'source_finder/option_parser' require 'quality/threshold' module BigFiles # Configuration for bigfiles gem class Config NUM_FILES_DEFAULT = 3 attr_reader :help, :num_files, :glob, :exclude, :minimum_high_water_mark def initialize(source_finder_option_parser: SourceFinder::OptionParser.new, num_files: Config::NUM_FILES_DEFAULT, quality_threshold: ::Quality::Threshold.new('bigfiles'), minimum_high_water_mark: 300, help: false, glob: source_finder_option_parser.default_source_files_glob, exclude: source_finder_option_parser .default_source_files_exclude_glob) @num_files = num_files @help = help @glob = glob @exclude = exclude @quality_threshold = quality_threshold @minimum_high_water_mark = minimum_high_water_mark end def high_water_mark @quality_threshold.threshold || @minimum_high_water_mark end def under_limit?(num_lines) num_lines <= high_water_mark end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
bigfiles-0.2.0 | lib/bigfiles/config.rb |