class Redmine::Commands::Issue

Dispatcher for issue-related subcommands.

Public Class Methods

new(issue_id:, redmine:) click to toggle source
# File lib/redmine/commands/issue.rb, line 8
def initialize(issue_id:, redmine:)
  @issue_id = issue_id
  @redmine = redmine
end

Public Instance Methods

call(arguments) click to toggle source
# File lib/redmine/commands/issue.rb, line 13
def call(arguments)
  subcommand, *other_args = arguments
  command = self.class.const_get(
    subcommand.split('_').map(&:capitalize).join
  )
  command.new(issue_id: @issue_id, redmine: @redmine).call(other_args)
end