Sha256: 6aa48d596f66ee42ea8d1801940c6b5d202fad67d260cb5536890a3bbf60d6ad

Contents?: true

Size: 1.37 KB

Versions: 1

Compression:

Stored size: 1.37 KB

Contents

# frozen_string_literal: true

module Synvert::Core
  # Synvert global configuration.
  class Configuration
    class << self
      # @!attribute [w] root_path
      # @!attribute [w] skip_paths
      # @!attribute [w] only_paths
      # @!attribute [w] show_run_process
      # @!attribute [w] number_of_workers
      # @!attribute [w] single_quote
      attr_writer :root_path, :skip_paths, :only_paths, :show_run_process, :number_of_workers, :single_quote

      # Get the path.
      #
      # @return [String] default is '.'
      def root_path
        @root_path || '.'
      end

      # Get a list of skip paths.
      #
      # @return [Array<String>] default is [].
      def skip_paths
        @skip_paths || []
      end

      # Get a list of only paths.
      #
      # @return [Array<String>] default is [].
      def only_paths
        @only_paths || []
      end

      # Check if show run process.
      #
      # @return [Boolean] default is false
      def show_run_process
        @show_run_process || false
      end

      # Number of workers
      #
      # @return [Integer] default is 1
      def number_of_workers
        @number_of_workers || 1
      end

      # Use single quote or double quote.
      #
      # @return [Boolean] true if use single quote, default is true
      def single_quote
        @single_quote.nil? ? true : @single_quote
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
synvert-core-1.20.0 lib/synvert/core/configuration.rb