Class: Redmine::Commands::Issues

Inherits:
Object
  • Object
show all
Extended by:
Redmine::Command
Defined in:
lib/redmine/commands/issues.rb

Overview

Command to list issues from Redmine.

Instance Method Summary collapse

Methods included from Redmine::Command

extended, usage, usage_description, usage_options

Constructor Details

#initialize(redmine:) ⇒ Issues

Returns a new instance of Issues.



32
33
34
# File 'lib/redmine/commands/issues.rb', line 32

def initialize(redmine:)
  @redmine = redmine
end

Instance Method Details

#call(_args) ⇒ Object



36
37
38
39
40
41
# File 'lib/redmine/commands/issues.rb', line 36

def call(_args)
  total = options.delete(:total) || 10
  @redmine.issues(options).first(total).each do |issue|
    puts "#{issue.id} #{issue.subject}"
  end
end