Sha256: f1e04bd278e6cad1f21af9364715ef453348b4694d018b6a5966c8caa365020f
Contents?: true
Size: 1.2 KB
Versions: 1
Compression:
Stored size: 1.2 KB
Contents
# frozen_string_literal: true module JsDependency module CliUtils class Config attr_reader :src_path, :target_paths, :target_path, :child_analyze_level, :parent_analyze_level, :output_path, :alias_paths, :name_level, :excludes # @param [Hash] options # @param [Hash] args def initialize(options, args) @src_path = options[:src_path] || args[:src_path] @target_paths = options[:target_paths] || (args[:target_path].is_a?(String) ? [args[:target_path]] : args[:target_path]) @target_path = options[:target_path] || args[:target_path] @child_analyze_level = options[:child_analyze_level] || args[:child_analyze_level] || 2 @parent_analyze_level = options[:parent_analyze_level] || args[:parent_analyze_level] || 2 @output_path = options[:output_path] || args[:output_path] || nil @alias_paths = args[:alias_paths] || nil @name_level = options[:name_level] || args[:name_level] || 1 @excludes = if options[:excludes]&.length&.positive? options[:excludes] elsif args[:excludes] args[:excludes] end end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
js_dependency-0.3.8 | lib/js_dependency/cli_utils/config.rb |