Class: NmaxWinter::Nmax

Inherits:
Object
  • Object
show all
Defined in:
lib/nmax_winter/nmax.rb

Instance Method Summary collapse

Constructor Details

#initialize(stdin, argv) ⇒ Nmax

Returns a new instance of Nmax.



5
6
7
8
# File 'lib/nmax_winter/nmax.rb', line 5

def initialize(stdin, argv)
  @stdin = stdin
  @nmax = argv[0].to_i
end

Instance Method Details

#callObject



10
11
12
13
14
15
# File 'lib/nmax_winter/nmax.rb', line 10

def call
  check_valid
  calc_nmax
rescue ArgumentError => e
  e.message
end