Class: Ankit::ScoreCommand
- Inherits:
-
EventTraversingCommand
- Object
- Command
- EventTraversingCommand
- Ankit::ScoreCommand
- Includes:
- CardNaming, EventFormatting
- Defined in:
- lib/ankit/score_command.rb
Constant Summary
Constants inherited from Command
Instance Attribute Summary
Attributes inherited from Command
Instance Method Summary collapse
Methods included from CardNaming
#card_wildcard_for, #to_card_name, #to_card_path
Methods included from EventFormatting
Methods inherited from EventTraversingCommand
Methods inherited from Command
available, by_name, command_name, define_options, #initialize, option_spec
Constructor Details
This class inherits a constructor from Ankit::Command
Instance Method Details
#execute ⇒ Object
15 16 17 18 19 20 21 22 |
# File 'lib/ankit/score_command.rb', line 15 def execute() args.each do |a| list = to_enum(:each_event, to_card_name(a)).to_a ([:last] ? list.sort_by(&:round).reverse.take(1) : list).each do |e| runtime.stdout.print("#{format_as_score(e)}\n") end end end |