class String
- String
- Reference
- Object
Overview
String
cast methods
Included Modules
- Comparable(String)
Defined in:
Instance Method Summary
- #cast(other)
- #cast?(other)
-
#to_array(value_type : T.class = String) forall T
Returns the
Array
value represented by givenYAML::Any
type, else raise aTypeCastError
exception. -
#to_array?(value_type : T.class = String) forall T
Returns the
Array
value represented by givenYAML::Any
type, else raise aTypeCastError
exception. - #to_bool
- #to_bool?
-
#to_float
Returns the
Float
value represented by givenYAML::Any
type, else raise aTypeCastError
exception. - #to_float32
- #to_float32?
- #to_float64
- #to_float64?
-
#to_float?
Returns the
Float
value represented by givenYAML::Any
type, else raise aTypeCastError
exception. -
#to_hash(value_type : T.class = String) forall T
Returns the
Hash
value represented by givenYAML::Any
type, else raise aTypeCastError
exception. -
#to_hash?(value_type : T.class = String) forall T
Returns the
Hash
value represented by givenYAML::Any
type, else raise aTypeCastError
exception. -
#to_int
Returns the
Int
value represented by givenYAML::Any
type, else raise aTypeCastError
exception. - #to_int16
- #to_int16?
- #to_int32
- #to_int32?
- #to_int64
- #to_int64?
- #to_int8
- #to_int8?
-
#to_int?
Returns the
Int
value represented by givenYAML::Any
type, else raise aTypeCastError
exception. -
#to_string
Alias to
Object.to_s
-
#to_time(location : Time::Location | Nil = nil, formatters : Array(String) | Nil = nil)
Returns the
Time
value represented by givenArray
type, else raise aTypeCastError
exception. - #to_time(location : Time::Location | Nil = nil, formatters : Array(String) | Nil = nil)
-
#to_time(location : Time::Location | Nil = nil, formatters : Array(String) | Nil = nil)
Returns the
Time
value represented by givenFloat
type, else raise aTypeCastError
exception. -
#to_time(location : Time::Location | Nil = nil, formatters : Array(String) | Nil = nil)
Returns the
Time
value represented by givenHash
type, else raise aTypeCastError
exception. -
#to_time(location : Time::Location | Nil = nil, formatters : Array(String) | Nil = nil)
Returns the
Time
value represented by givenInt
type, else raise aTypeCastError
exception. - #to_time(location : Time::Location | Nil = nil, formatters : Array(String) | Nil = nil)
-
#to_time(location : Time::Location | Nil = nil, formatters : Array(String) | Nil = nil)
Returns the
Time
value represented by givenArray
type, else raise aTypeCastError
exception. -
#to_time(location : Time::Location | Nil = nil, formatters : Array(String) | Nil = nil)
Returns the
Time
value represented by givenNil
type, else raise aTypeCastError
exception. - #to_time(location : Time::Location | Nil = nil, formatters : Array(String) | Nil = nil)
- #to_time(location : Time::Location | Nil = nil, formatters : Array(String) | Nil = nil)
- #to_time(location : Time::Location | Nil = nil, formatters : Array(String) | Nil = nil)
- #to_time(location : Time::Location | Nil = nil, formatters : Array(String) | Nil = nil)
-
#to_time?(location : Time::Location | Nil = nil, formatters : Array(String) | Nil = nil)
Returns the
Time
value represented by givenArray
type, else raise aTypeCastError
exception. - #to_time?(location : Time::Location | Nil = nil, formatters : Array(String) | Nil = nil)
-
#to_time?(location : Time::Location | Nil = nil, formatters : Array(String) | Nil = nil)
Returns the
Time
value represented by givenFloat
type, else raise aTypeCastError
exception. -
#to_time?(location : Time::Location | Nil = nil, formatters : Array(String) | Nil = nil)
Returns the
Time
value represented by givenHash
type, else raise aTypeCastError
exception. -
#to_time?(location : Time::Location | Nil = nil, formatters : Array(String) | Nil = nil)
Returns the
Time
value represented by givenInt
type, else raise aTypeCastError
exception. - #to_time?(location : Time::Location | Nil = nil, formatters : Array(String) | Nil = nil)
-
#to_time?(location : Time::Location | Nil = nil, formatters : Array(String) | Nil = nil)
Returns the
Time
value represented by givenArray
type, else raise aTypeCastError
exception. -
#to_time?(location : Time::Location | Nil = nil, formatters : Array(String) | Nil = nil)
Returns the
Time
value represented by givenNil
type, else raise aTypeCastError
exception. - #to_time?(location : Time::Location | Nil = nil, formatters : Array(String) | Nil = nil)
- #to_time?(location : Time::Location | Nil = nil, formatters : Array(String) | Nil = nil)
- #to_time?(location : Time::Location | Nil = nil, formatters : Array(String) | Nil = nil)
- #to_time?(location : Time::Location | Nil = nil, formatters : Array(String) | Nil = nil)
-
#to_uint
Returns the
UInt
value represented by givenYAML::Any
type, else raise aTypeCastError
exception. - #to_uint16
- #to_uint16?
- #to_uint32
- #to_uint32?
- #to_uint64
- #to_uint64?
- #to_uint8
- #to_uint8?
-
#to_uint?
Returns the
UInt
value represented by givenYAML::Any
type, else raise aTypeCastError
exception.
Instance Method Detail
Returns the Float
value represented by given YAML::Any
type, else raise a TypeCastError
exception.
Returns the Float32
value represented by given YAML::Any
type, else raise a TypeCastError
exception.
Returns the Float32
value represented by given YAML::Any
type, else raise a TypeCastError
exception.
Returns the Float64
value represented by given YAML::Any
type, else raise a TypeCastError
exception.
Returns the Float64
value represented by given YAML::Any
type, else raise a TypeCastError
exception.
Returns the Float
value represented by given YAML::Any
type, else raise a TypeCastError
exception.
Returns the Int
value represented by given YAML::Any
type, else raise a TypeCastError
exception.
Returns the Int
value represented by given YAML::Any
type, else raise a TypeCastError
exception.
Returns the UInt
value represented by given YAML::Any
type, else raise a TypeCastError
exception.