Class: Ankit::CardHappeningCommand

Inherits:
Command
  • Object
show all
Includes:
CardHappening, EventFormatting
Defined in:
lib/ankit/card_happening_command.rb

Direct Known Subclasses

FailCommand, PassCommand

Constant Summary

Constants inherited from Command

Ankit::Command::COMMANDS

Instance Attribute Summary

Attributes inherited from Command

#args, #options, #runtime

Instance Method Summary collapse

Methods included from EventFormatting

#format_as_score

Methods included from CardHappening

#make_happen

Methods included from CardNaming

#card_wildcard_for, #to_card_name, #to_card_path

Methods included from EventTraversing

find_latest_event_for, find_latest_event_named, #latest_event_for

Methods included from RoundCounting

#last_round, #latest_round, #next_round, #round_proceeded

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

#executeObject



26
27
28
29
# File 'lib/ankit/card_happening_command.rb', line 26

def execute()
  head = make_happen(self.class::EVENT_HAPPENING, to_card_name(args[0]))
  runtime.stdout.print("#{format_as_score(head)}\n")
end