Class: Ankit::NameCommand

Inherits:
TextReadingCommand show all
Defined in:
lib/ankit/name_command.rb

Constant Summary

Constants inherited from Command

Command::COMMANDS

Instance Attribute Summary

Attributes inherited from Command

#args, #options, #runtime

Instance Method Summary collapse

Methods inherited from TextReadingCommand

#each_text, #validate_options

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



9
10
11
12
13
14
# File 'lib/ankit/name_command.rb', line 9

def execute()
  validate_options
  each_text do |text|
    runtime.stdout.print("#{Card.parse(text).name}\n")
  end
end