Sha256: 48dcddb946ac2700b2320843080ae7e0c58de1c073950492a00739ddeff22e08

Contents?: true

Size: 561 Bytes

Versions: 1

Compression:

Stored size: 561 Bytes

Contents

# frozen_string_literal: true

require 'yaml'

module StrictTodo
  class Config
    private_class_method :new

    COMMON = YAML.safe_load(File.read("config/config.yml")).fetch("common").freeze

    # @return [Array] 除外対象
    attr_reader :exclude_match
    # @return [Array] 検索対象の拡張子
    attr_reader :permit_extensions

    def initialize
      @exclude_match = COMMON.fetch("exclude")
      @permit_extensions = COMMON.fetch("extension")
    end

    class << self
      def load
        return new.freeze()
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
strict-todo-0.0.1 lib/strict_todo/config.rb