Module: Types::Integer
- Extended by:
- Generic
- Defined in:
- lib/types/integer.rb
Overview
Represents an integer type.
“‘ruby type = Types::Integer type.parse(“42”) # => 42 “`
Class Method Summary collapse
-
.parse(input) ⇒ Object
Parses the input as an integer.
-
.resolve ⇒ Object
Resolves to the actual Ruby Integer class.
- .to_rbs ⇒ Object
Methods included from Generic
composite?, to_rbs, to_s, |
Class Method Details
.parse(input) ⇒ Object
Parses the input as an integer.
22 23 24 |
# File 'lib/types/integer.rb', line 22 def self.parse(input) Integer(input) end |
.resolve ⇒ Object
Resolves to the actual Ruby Integer class.
33 34 35 |
# File 'lib/types/integer.rb', line 33 def self.resolve ::Integer end |
.to_rbs ⇒ Object
27 28 29 |
# File 'lib/types/integer.rb', line 27 def self.to_rbs "Integer" end |