Class: HowOldAu::Command
- Inherits:
-
Object
- Object
- HowOldAu::Command
- Defined in:
- lib/how_old_au/command.rb,
lib/how_old_au/command/options.rb
Defined Under Namespace
Modules: Options
Class Method Summary collapse
Instance Method Summary collapse
- #execute ⇒ Object
-
#initialize(argv) ⇒ Command
constructor
A new instance of Command.
Constructor Details
#initialize(argv) ⇒ Command
Returns a new instance of Command.
7 8 9 |
# File 'lib/how_old_au/command.rb', line 7 def initialize(argv) @argv = argv end |
Class Method Details
.run(argv) ⇒ Object
3 4 5 |
# File 'lib/how_old_au/command.rb', line 3 def self.run(argv) new(argv).execute end |
Instance Method Details
#execute ⇒ Object
11 12 13 14 |
# File 'lib/how_old_au/command.rb', line 11 def execute = Options.parse!(@argv) puts 2015 - 1977 + 1 end |