Class: Interactive::ResponseWithArgs

Inherits:
SimpleDelegator
  • Object
show all
Defined in:
lib/interactive/response.rb

Instance Method Summary collapse

Constructor Details

#initialize(*args) ⇒ ResponseWithArgs

Returns a new instance of ResponseWithArgs.



27
28
29
30
31
32
33
34
35
36
37
38
# File 'lib/interactive/response.rb', line 27

def initialize(*args)
  @args = Array(args).flatten
  check_validity

  @_response = STDIN.gets.chomp

  define_methods
  define_invalid
  define_whole_number

  super(@_response)
end