lib/nmax/cli.rb
# returns an array of digits if all is successful
# or message, if nothing not found
returns an array of digits if all is successful
or message, if nothing not found
returns an array of digits if all is successful or message if nothing not found
def find_digits
      numbers_of_digit = text.scan(REGEXP_FOR_FIND).map(&:to_i).uniq
      if numbers_of_digit.empty?
        'No digits found'
      else
        numbers_of_digit.max(number.to_i)
      end
    end
def find_digits numbers_of_digit = text . scan ( REGEXP_FOR_FIND ) . map ( & :to_i ) . uniq if numbers_of_digit . empty? 'No digits found' else numbers_of_digit . max ( number . to_i ) end end
returns an array of digits if all is successful
or message, if nothing not found
returns an array of digits if all is successful or message if nothing not found