Module: PGit::Helpers::StringExtensions
- Defined in:
- lib/pgit/helpers/string_extensions.rb
Instance Method Summary collapse
Instance Method Details
#cancel? ⇒ Boolean
20 21 22 |
# File 'lib/pgit/helpers/string_extensions.rb', line 20 def cancel? letter?('c') end |
#index? ⇒ Boolean
8 9 10 |
# File 'lib/pgit/helpers/string_extensions.rb', line 8 def index? match(/^[1-9][0-9]*$/) end |
#letter?(letter) ⇒ Boolean
4 5 6 |
# File 'lib/pgit/helpers/string_extensions.rb', line 4 def letter?(letter) match(/^#{letter}$/i) end |
#no? ⇒ Boolean
16 17 18 |
# File 'lib/pgit/helpers/string_extensions.rb', line 16 def no? letter?('n') end |
#yes? ⇒ Boolean
12 13 14 |
# File 'lib/pgit/helpers/string_extensions.rb', line 12 def yes? letter?('y') end |