Class: Taro::Types::Scalar::IntegerType
- Inherits:
-
Taro::Types::ScalarType
- Object
- BaseType
- Taro::Types::ScalarType
- Taro::Types::Scalar::IntegerType
- Defined in:
- lib/taro/types/scalar/integer_type.rb
Constant Summary
Constants included from Taro::Types::Shared::Pattern
Taro::Types::Shared::Pattern::ADVANCED_RUBY_REGEXP_SYNTAX_REGEXP, Taro::Types::Shared::Pattern::NOT_ESCAPED
Instance Method Summary collapse
Methods included from Taro::Types::Shared::Pattern
included, #pattern, to_es262, validate, validate_no_advanced_syntax, validate_no_flags, validate_not_empty
Instance Method Details
#coerce_input ⇒ Object
4 5 6 |
# File 'lib/taro/types/scalar/integer_type.rb', line 4 def coerce_input object.instance_of?(Integer) ? object : input_error('must be an Integer') end |
#coerce_response ⇒ Object
8 9 10 |
# File 'lib/taro/types/scalar/integer_type.rb', line 8 def coerce_response object.instance_of?(Integer) ? object : response_error('must be an Integer') end |