Module: Types::String

Extended by:
Generic
Defined in:
lib/types/string.rb

Overview

Represents a string type.

“‘ruby type = Types::String type.parse(42) # => “42” “`

Class Method Summary collapse

Methods included from Generic

composite?, to_rbs, to_s, |

Class Method Details

.parse(input) ⇒ Object

Parses the input as a string.



21
22
23
# File 'lib/types/string.rb', line 21

def self.parse(input)
	input.to_s
end

.resolveObject

Resolves to the actual Ruby String class.



32
33
34
# File 'lib/types/string.rb', line 32

def self.resolve
	::String
end

.to_rbsObject



26
27
28
# File 'lib/types/string.rb', line 26

def self.to_rbs
	"String"
end