Skip to content

Commit

Permalink
Merge fed650a into 65187af
Browse files Browse the repository at this point in the history
  • Loading branch information
2called-chaos committed Mar 22, 2020
2 parents 65187af + fed650a commit c790282
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ result = prompt.collect do
key(:address) do
key(:street).ask('Street?', required: true)
key(:city).ask('City?')
key(:zip).ask('Zip?', validate: /\A\d{3}\Z/)
key(:zip).ask('Zip?', validation: /\A\d{3}\Z/)
end
end
# =>
Expand Down Expand Up @@ -1234,7 +1234,7 @@ prompt.collect do
key(:address) do
key(:street).ask('Street?', required: true)
key(:city).ask('City?')
key(:zip).ask('Zip?', validate: /\A\d{3}\Z/)
key(:zip).ask('Zip?', validation: /\A\d{3}\Z/)
end
end
# =>
Expand All @@ -1253,7 +1253,7 @@ result = prompt.collect do
key(:addresses).values do
key(:street).ask('Street?', required: true)
key(:city).ask('City?')
key(:zip).ask('Zip?', validate: /\A\d{3}\Z/)
key(:zip).ask('Zip?', validation: /\A\d{3}\Z/)
end
end
end
Expand Down Expand Up @@ -1315,7 +1315,7 @@ prompt.slider('Volume', max: 100, step: 5, default: 75)
You can also change the default slider formatting using the `:format`. The value must contain the `:slider` token to show current value and any `sprintf` compatible flag for number display, in our case `%d`:

```ruby
prompt.slider('Volume', max: 100, step: 5, default: 75, format: "|:slider| %d%")
prompt.slider('Volume', max: 100, step: 5, default: 75, format: "|:slider| %d%%")
# =>
# Volume |───────────────●──────| 75%
# (Use arrow keys, press Enter to select)
Expand Down

0 comments on commit c790282

Please sign in to comment.