Module: JSSRubyExtensions::String::Predicates
- Included in:
- String
- Defined in:
- lib/jss/ruby_extensions/string/predicates.rb
Constant Summary collapse
- INTEGER_RE =
/\A[0-9]+\Z/.freeze
Instance Method Summary collapse
-
#jss_integer? ⇒ Boolean
Is this string also a positive integer? (i.e. it consists only of numberic digits).
Instance Method Details
#jss_integer? ⇒ Boolean
Is this string also a positive integer? (i.e. it consists only of numberic digits)
39 40 41 |
# File 'lib/jss/ruby_extensions/string/predicates.rb', line 39 def jss_integer? self =~ INTEGER_RE ? true : false end |