lib/tty/prompt.rb
def slider(question, *args, &block)
      options = Utils.extract_options!(args)
      slider = Slider.new(self, options)
      slider.call(question, &block)
    end
# Ask a question with a range slider
#
# @example
#   prompt = TTY::Prompt.new
#   prompt.slider('What size?', min: 32, max: 54, step: 2)
#
# @param [String] question
#   the question to ask
#
# @return [String]
#
# @api public
Ask a question with a range slider
Ask a question with a range slider
def slider(question, *args, &block)
      options = Utils.extract_options!(args)
      slider = Slider.new(self, options)
      slider.call(question, &block)
    end
def slider ( question , * args , & block ) options = Utils . extract_options! ( args ) slider = Slider . new ( self , options ) slider . call ( question , & block ) end
Ask a question with a range slider
Ask a question with a range slider
None
String
question
args
block
question the question to ask
question the question to ask
example
prompt = TTY::Prompt.new prompt.slider('What size?', min: 32, max: 54, step: 2)
prompt = TTY :: Prompt . new prompt . slider ( ' What size? ' min : 32 max : 54 step : 2 )
api
None