Class: Redmine::Commands::LeadTimes
- Inherits:
-
Object
- Object
- Redmine::Commands::LeadTimes
- Extended by:
- Redmine::Command
- Defined in:
- lib/redmine/commands/lead_times.rb
Overview
Command to calculate lead times for one or more tickets in Redmine.
Instance Method Summary collapse
- #call(arguments) ⇒ Object
-
#initialize(redmine:) ⇒ LeadTimes
constructor
A new instance of LeadTimes.
Methods included from Redmine::Command
extended, usage, usage_description, usage_options
Constructor Details
#initialize(redmine:) ⇒ LeadTimes
Returns a new instance of LeadTimes.
11 12 13 |
# File 'lib/redmine/commands/lead_times.rb', line 11 def initialize(redmine:) @redmine = redmine end |
Instance Method Details
#call(arguments) ⇒ Object
22 23 24 25 26 27 28 29 |
# File 'lib/redmine/commands/lead_times.rb', line 22 def call(arguments) case [:format] when 'json' then generate_json(arguments) when 'csv' then generate_csv(arguments) when 'text' then generate_text(arguments) else raise ArgumentError, "Unknown format #{[:format].inspect}" end end |