Class: HowOldAu::Command

Inherits:
Object
  • Object
show all
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

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

#executeObject



11
12
13
14
# File 'lib/how_old_au/command.rb', line 11

def execute
  options = Options.parse!(@argv)
  puts 2015 - 1977 + 1 
end