Class Simp::Cli::Config::IntegerItem
In: lib/simp/cli/config/items/integer_item.rb
Parent: Item

An Item that asks for an Integer instead of a String NOTE:

  • @value is a Integer
  • os_value() and recommended_value() must return Integers
  • validate() will be passed either an Integer or a String value, depending upon where it is called in the code. (Highline#ask() calls it with a String containing the user‘s input, prior to converting it to an Integer).

Methods

Public Instance methods

Ensure queried item is converted to an integer

Ensure value set externally is converted to an integer before being written to YAML

[Validate]