Class: Debtective::Comments::Command

Inherits:
Object
  • Object
show all
Defined in:
lib/debtective/comments/command.rb

Overview

Handle comments command and given ARGVs

Constant Summary collapse

TYPE_OPTIONS =
%w[fixme magic note offense shebang todo yard].freeze

Instance Method Summary collapse

Constructor Details

#initialize(args, quiet: false) ⇒ Command

Returns a new instance of Command.

Parameters:

  • args (Array<String>)

    ARGVs from command line (order matters)

  • quiet (Boolean) (defaults to: false)


13
14
15
16
# File 'lib/debtective/comments/command.rb', line 13

def initialize(args, quiet: false)
  @args = args
  @quiet = quiet
end

Instance Method Details

#callDebtective::Comments::Export



19
20
21
22
23
24
25
26
27
28
# File 'lib/debtective/comments/command.rb', line 19

def call
  Export.new(
    user_name: user_name,
    quiet: @quiet,
    included_types: included_types,
    excluded_types: excluded_types,
    included_paths: paths("include"),
    excluded_paths: paths("exclude")
  ).call
end