Module: IntegerStringImpl
- Included in:
- String
- Defined in:
- lib/sorbet-rails/custom_types/integer_string.rb
Overview
typed: false
Instance Method Summary collapse
- #_is_a_integer_string? ⇒ Boolean
- #instance_of?(type) ⇒ Boolean
- #is_a?(type) ⇒ Boolean
- #kind_of?(type) ⇒ Boolean
Instance Method Details
#_is_a_integer_string? ⇒ Boolean
18 19 20 21 22 23 24 |
# File 'lib/sorbet-rails/custom_types/integer_string.rb', line 18 def _is_a_integer_string? return @cached_is_a unless @cached_is_a.nil? Integer(self, 10) @cached_is_a = true rescue ArgumentError => err @cached_is_a = false end |
#instance_of?(type) ⇒ Boolean
13 14 15 16 |
# File 'lib/sorbet-rails/custom_types/integer_string.rb', line 13 def instance_of?(type) return super unless type == IntegerString _is_a_integer_string? end |
#is_a?(type) ⇒ Boolean
3 4 5 6 |
# File 'lib/sorbet-rails/custom_types/integer_string.rb', line 3 def is_a?(type) return super unless type == IntegerString _is_a_integer_string? end |
#kind_of?(type) ⇒ Boolean
8 9 10 11 |
# File 'lib/sorbet-rails/custom_types/integer_string.rb', line 8 def kind_of?(type) return super unless type == IntegerString _is_a_integer_string? end |