Class: LicenseFinder::CLI::IgnoredDependencies

Inherits:
ConfigSubcommand show all
Defined in:
lib/license_finder/cli.rb

Instance Method Summary collapse

Methods inherited from Subcommand

banner

Methods inherited from Base

subcommand

Instance Method Details

#add(group) ⇒ Object



200
201
202
203
204
205
# File 'lib/license_finder/cli.rb', line 200

def add(group)
  modifying {
    LicenseFinder.config.ignore_dependencies.push(group)
  }
  say "Added #{group} to the ignored dependencies"
end

#listObject



186
187
188
189
190
191
192
193
194
195
196
197
# File 'lib/license_finder/cli.rb', line 186

def list
  ignored = LicenseFinder.config.ignore_dependencies

  say "Ignored Dependencies:", :blue
  if ignored.any?
    ignored.each do |group|
      say group
    end
  else
    say '(none)'
  end
end

#remove(group) ⇒ Object



208
209
210
211
212
213
# File 'lib/license_finder/cli.rb', line 208

def remove(group)
  modifying {
    LicenseFinder.config.ignore_dependencies.delete(group)
  }
  say "Removed #{group} from the ignored dependencies"
end