Popcorn::Cast
Instance methods
Returns the Array value represented by given Array type, else raise a TypeCastError exception.
Returns the Array value represented by given Bool type, else raise a TypeCastError exception.
Returns the Array value represented by given Float type, else raise a TypeCastError exception.
Returns the Array value represented by given Hash type, else raise a TypeCastError exception.
Returns the Array value represented by given Int type, else raise a TypeCastError exception.
Returns the Array value represented by given JSON::Any type, else raise a TypeCastError exception.
Returns the Array value represented by given NamedTuple type, else raise a TypeCastError exception.
Returns the Array value represented by given Time type, else raise a TypeCastError exception.
Returns the Array value represented by given String type, else raise a TypeCastError exception.
Returns the Array value represented by given Symbol type, else raise a TypeCastError exception.
Returns the Array value represented by given YAML::Any type, else raise a TypeCastError exception.
Returns the Array or Nil value represented by given Array type.
Returns the Array or Nil value represented by given Bool type.
Returns the Array or Nil value represented by given Float type.
Returns the Array or Nil value represented by given Hash type.
Popcorn.to_array?({"a" => "b", "c" => "d"}) # => ["a", "b", "c", "d"]
Returns the Array or Nil value represented by given Int type.
Returns the Array or Nil value represented by given JSON::Any type.
Returns the Array or Nil value represented by given NamedTuple type.
Returns the Array or Nil value represented by given Time type.
Returns the Array or Nil value represented by given String type.
Returns the Array or Nil value represented by given Symbol type.
Returns the Array or Nil value represented by given YAML::Any type.
Returns the Bool value represented by given Array type, else raise a TypeCastError exception.
Returns the Bool value represented by given Bool type, else raise a TypeCastError exception.
Returns the Bool value represented by given Float type, else raise a TypeCastError exception.
Returns the Bool value represented by given Hash type, else raise a TypeCastError exception.
Returns the Bool value represented by given Int type, else raise a TypeCastError exception.
Returns the Bool value represented by given JSON::Any type, else raise a TypeCastError exception.
Returns the Bool value represented by given NamedTuple type, else raise a TypeCastError exception.
Returns the Bool value represented by given Nil type, else raise a TypeCastError exception.
Returns the Bool value represented by given String type, else raise a TypeCastError exception.
Returns the Bool value represented by given Symbol type, else raise a TypeCastError exception.
Returns the Bool value represented by given Time type, else raise a TypeCastError exception.
Returns the Bool value represented by given YAML::Any type, else raise a TypeCastError exception.
Returns the Bool value represented by given Bool type.
It accepts true, t, yes, y, on, 1, false, f, no, n, off, 0. Any other value return an error.
Returns the Bool or Nil value represented by given Float type.
It accepts true, t, yes, y, on, 1, false, f, no, n, off, 0. Any other value return an error.
Returns the Bool or Nil value represented by given Int type.
It accepts true, t, yes, y, on, 1, false, f, no, n, off, 0. Any other value return an error.
Returns the Bool or Nil value represented by given JSON::Any type.
It accepts true, t, yes, y, on, 1, false, f, no, n, off, 0. Any other value return an error.
Returns the Bool or Nil value represented by given NamedTuple type.
Returns the Bool value represented by given Nil type.
It accepts true, t, yes, y, on, 1, false, f, no, n, off, 0. Any other value return an error.
Returns the Bool or Nil value represented by given String type.
It accepts true, t, yes, y, on, 1, false, f, no, n, off, 0. Any other value return an error.
Returns the Bool or Nil value represented by given Symbol type.
It accepts true, t, yes, y, on, 1, false, f, no, n, off, 0. Any other value return an error.
Returns the Nil value represented by given Time type.
It accepts true, t, yes, y, on, 1, false, f, no, n, off, 0. Any other value return an error.
Returns the Bool or Nil value represented by given YAML::Any type.
It accepts true, t, yes, y, on, 1, false, f, no, n, off, 0. Any other value return an error.
Returns the Float value represented by given Array type, else raise a TypeCastError exception.
Returns the Float value represented by given Bool type, else raise a TypeCastError exception.
Returns the Float value represented by given Float type, else raise a TypeCastError exception.
Returns the Float value represented by given Hash type, else raise a TypeCastError exception.
Returns the Float value represented by given Int type, else raise a TypeCastError exception.
Returns the Float value represented by given JSON::Any type, else raise a TypeCastError exception.
Returns the Float value represented by given NamedTuple type, else raise a TypeCastError exception.
Returns the Float value represented by given Nil type, else raise a TypeCastError exception.
Returns the Float value represented by given String type, else raise a TypeCastError exception.
Returns the Float value represented by given Symbol type, else raise a TypeCastError exception.
Returns the Float value represented by given Time type, else raise a TypeCastError exception.
Returns the Float value represented by given YAML::Any type, else raise a TypeCastError exception.
Returns the Float32 value represented by given Array type, else raise a TypeCastError exception.
Returns the Float32 value represented by given Bool type, else raise a TypeCastError exception.
Returns the Float32 value represented by given Float type, else raise a TypeCastError exception.
Returns the Float32 value represented by given Hash type, else raise a TypeCastError exception.
Returns the Float32 value represented by given Int type, else raise a TypeCastError exception.
Returns the Float32 value represented by given JSON::Any type, else raise a TypeCastError exception.
Returns the Float32 value represented by given NamedTuple type, else raise a TypeCastError exception.
Returns the Float32 value represented by given Nil type, else raise a TypeCastError exception.
Returns the Float32 value represented by given String type, else raise a TypeCastError exception.
Returns the Float32 value represented by given Symbol type, else raise a TypeCastError exception.
Returns the Float32 value represented by given Time type, else raise a TypeCastError exception.
Returns the Float32 value represented by given YAML::Any type, else raise a TypeCastError exception.
Returns the Float32 or Nil value represented by given JSON::Any type.
Returns the Float32 or Nil value represented by given YAML::Any type.
Returns the Float64 value represented by given Array type, else raise a TypeCastError exception.
Returns the Float64 value represented by given Bool type, else raise a TypeCastError exception.
Returns the Float64 value represented by given Float type, else raise a TypeCastError exception.
Returns the Float64 value represented by given Hash type, else raise a TypeCastError exception.
Returns the Float64 value represented by given Int type, else raise a TypeCastError exception.
Returns the Float64 value represented by given JSON::Any type, else raise a TypeCastError exception.
Returns the Float64 value represented by given NamedTuple type, else raise a TypeCastError exception.
Returns the Float64 value represented by given Nil type, else raise a TypeCastError exception.
Returns the Float64 value represented by given String type, else raise a TypeCastError exception.
Returns the Float64 value represented by given Symbol type, else raise a TypeCastError exception.
Returns the Float64 value represented by given Time type, else raise a TypeCastError exception.
Returns the Float64 value represented by given YAML::Any type, else raise a TypeCastError exception.
Returns the Float64 or Nil value represented by given YAML::Any type.
Returns the Float64 or Nil value represented by given JSON::Any type.
Returns the Hash value represented by given Array type, else raise a TypeCastError exception.
Returns the Hash value represented by given Bool type, else raise a TypeCastError exception.
Returns the Hash value represented by given Float type, else raise a TypeCastError exception.
Returns the Hash value represented by given Hash type, else raise a TypeCastError exception.
Returns the Hash value represented by given Int type, else raise a TypeCastError exception.
Returns the Hash value represented by given JSON::Any type, else raise a TypeCastError exception.
Returns the Hash value represented by given NamedTuple type, else raise a TypeCastError exception.
Returns the Hash value represented by given Time type, else raise a TypeCastError exception.
Returns the Hash value represented by given String type, else raise a TypeCastError exception.
Returns the Hash value represented by given Symbol type, else raise a TypeCastError exception.
Returns the Hash value represented by given YAML::Any type, else raise a TypeCastError exception.
Returns the Hash or Nil value represented by given Array type.
Returns the Hash or Nil value represented by given Bool type.
Returns the Hash or Nil value represented by given Float type.
Returns the Hash or Nil value represented by given Hash type.
Returns the Hash or Nil value represented by given Int type.
Returns the Hash or Nil value represented by given JSON::Any type.
Returns the Hash or Nil value represented by given NamedTuple type.
Returns the Hash or Nil value represented by given Time type.
Returns the Hash or Nil value represented by given String type.
Returns the Hash or Nil value represented by given Symbol type.
Returns the Hash or Nil value represented by given YAML::Any type.
Returns the Int value represented by given Array type, else raise a TypeCastError exception.
Returns the Int value represented by given Bool type, else raise a TypeCastError exception.
Returns the Int value represented by given Float type, else raise a TypeCastError exception.
Returns the Int value represented by given Hash type, else raise a TypeCastError exception.
Returns the Int value represented by given Int type, else raise a TypeCastError exception.
Returns the Int value represented by given JSON::Any type, else raise a TypeCastError exception.
Returns the Int value represented by given NamedTuple type, else raise a TypeCastError exception.
Returns the Int value represented by given Nil type, else raise a TypeCastError exception.
Returns the Int value represented by given String type, else raise a TypeCastError exception.
Returns the Int value represented by given Symbol type, else raise a TypeCastError exception.
Returns the Int value represented by given Time type, else raise a TypeCastError exception.
Returns the Int value represented by given YAML::Any type, else raise a TypeCastError exception.
Returns the Int16 value represented by given Array type, else raise a TypeCastError exception.
Returns the Int16 value represented by given Bool type, else raise a TypeCastError exception.
Returns the Int16 value represented by given Float type, else raise a TypeCastError exception.
Returns the Int16 value represented by given Hash type, else raise a TypeCastError exception.
Returns the Int16 value represented by given Int type, else raise a TypeCastError exception.
Returns the Int16 value represented by given JSON::Any type, else raise a TypeCastError exception.
Returns the Int16 value represented by given NamedTuple type, else raise a TypeCastError exception.
Returns the Int16 value represented by given Nil type, else raise a TypeCastError exception.
Returns the Int16 value represented by given String type, else raise a TypeCastError exception.
Returns the Int16 value represented by given Symbol type, else raise a TypeCastError exception.
Returns the Int16 value represented by given Time type, else raise a TypeCastError exception.
Returns the Int16 value represented by given YAML::Any type, else raise a TypeCastError exception.
Returns the Int16 or Nil value represented by given JSON::Any type.
Returns the Int16 or Nil value represented by given YAML::Any type.
Returns the Int32 value represented by given Array type, else raise a TypeCastError exception.
Returns the Int32 value represented by given Bool type, else raise a TypeCastError exception.
Returns the Int32 value represented by given Float type, else raise a TypeCastError exception.
Returns the Int32 value represented by given Hash type, else raise a TypeCastError exception.
Returns the Int32 value represented by given Int type, else raise a TypeCastError exception.
Returns the Int32 value represented by given JSON::Any type, else raise a TypeCastError exception.
Returns the Int32 value represented by given NamedTuple type, else raise a TypeCastError exception.
Returns the Int32 value represented by given Nil type, else raise a TypeCastError exception.
Returns the Int32 value represented by given String type, else raise a TypeCastError exception.
Returns the Int32 value represented by given Symbol type, else raise a TypeCastError exception.
Returns the Int32 value represented by given Time type, else raise a TypeCastError exception.
Returns the Int32 value represented by given YAML::Any type, else raise a TypeCastError exception.
Returns the Int32 or Nil value represented by given JSON::Any type.
Returns the Int32 or Nil value represented by given YAML::Any type.
Returns the Int64 value represented by given Array type, else raise a TypeCastError exception.
Returns the Int64 value represented by given Bool type, else raise a TypeCastError exception.
Returns the Int64 value represented by given Float type, else raise a TypeCastError exception.
Returns the Int64 value represented by given Hash type, else raise a TypeCastError exception.
Returns the Int64 value represented by given Int type, else raise a TypeCastError exception.
Returns the Int64 value represented by given JSON::Any type, else raise a TypeCastError exception.
Returns the Int64 value represented by given NamedTuple type, else raise a TypeCastError exception.
Returns the Int64 value represented by given Nil type, else raise a TypeCastError exception.
Returns the Int64 value represented by given String type, else raise a TypeCastError exception.
Returns the Int64 value represented by given Symbol type, else raise a TypeCastError exception.
Returns the Int64 value represented by given Time type, else raise a TypeCastError exception.
Returns the Int64 value represented by given YAML::Any type, else raise a TypeCastError exception.
Returns the Int64 or Nil value represented by given JSON::Any type.
Returns the Int64 or Nil value represented by given YAML::Any type.
Returns the Int8 value represented by given Array type, else raise a TypeCastError exception.
Returns the Int8 value represented by given Bool type, else raise a TypeCastError exception.
Returns the Int8 value represented by given Float type, else raise a TypeCastError exception.
Returns the Int8 value represented by given Hash type, else raise a TypeCastError exception.
Returns the Int8 value represented by given Int type, else raise a TypeCastError exception.
Returns the Int8 value represented by given JSON::Any type, else raise a TypeCastError exception.
Returns the Int8 value represented by given NamedTuple type, else raise a TypeCastError exception.
Returns the Int8 value represented by given Nil type, else raise a TypeCastError exception.
Returns the Int8 value represented by given String type, else raise a TypeCastError exception.
Returns the Int8 value represented by given Symbol type, else raise a TypeCastError exception.
Returns the Int8 value represented by given Time type, else raise a TypeCastError exception.
Returns the Int8 value represented by given YAML::Any type, else raise a TypeCastError exception.
Returns the Time value represented by given Array type, else raise a TypeCastError exception.
Returns the Time value represented by given Bool type, else raise a TypeCastError exception.
Returns the Time value represented by given Float type, else raise a TypeCastError exception.
Returns the Time value represented by given Hash type, else raise a TypeCastError exception.
Returns the Time value represented by given Int type, else raise a TypeCastError exception.
Returns the Time value represented by given JSON::Any type, else raise a TypeCastError exception.
Returns the Time value represented by given Array type, else raise a TypeCastError exception.
Returns the Time value represented by given Nil type, else raise a TypeCastError exception.
Returns the Time value represented by given String type, else raise a TypeCastError exception.
Returns the Time value represented by given Symbol type, else raise a TypeCastError exception.
Returns the Time value represented by given Time type, else raise a TypeCastError exception.
Returns the Time value represented by given YAML::Any type, else raise a TypeCastError exception.
Returns the Time or Nil value represented by given Array type.
locationargument applies forInt/Stringtypesformattersargument applies forStringtype.
Returns the Nil value represented by given Bool type.
locationargument applies forInt/Stringtypesformattersargument applies forStringtype.
Returns the Nil value represented by given Float type.
locationargument applies forInt/Stringtypesformattersargument applies forStringtype.
Returns the Nil value represented by given Hash type.
locationargument applies forInt/Stringtypesformattersargument applies forStringtype.
Returns the Time or Nil value represented by given Int type.
locationargument applies forInt/Stringtypesformattersargument applies forStringtype.
Returns the Time or Nil value represented by given JSON::Any type.
locationargument applies forInt/Stringtypesformattersargument applies forStringtype.
Returns the Nil value represented by given NamedTuple type.
locationargument applies forInt/Stringtypesformattersargument applies forStringtype.
Returns the Nil value represented by given Nil type.
locationargument applies forInt/Stringtypesformattersargument applies forStringtype.
Returns the Time or Nil value represented by given String type.
locationargument applies forInt/Stringtypesformattersargument applies forStringtype.
Returns the Nil value represented by given Symbol type.
locationargument applies forInt/Stringtypesformattersargument applies forStringtype.
Returns the Time or Nil value represented by given Time type.
locationargument applies forInt/Stringtypesformattersargument applies forStringtype.
Returns the Time or Nil value represented by given YAML::Any type.
locationargument applies forInt/Stringtypesformattersargument applies forStringtype.
Returns the UInt value represented by given Array type, else raise a TypeCastError exception.
Returns the UInt value represented by given Bool type, else raise a TypeCastError exception.
Returns the UInt value represented by given Float type, else raise a TypeCastError exception.
Returns the UInt value represented by given Hash type, else raise a TypeCastError exception.
Returns the UInt value represented by given Int type, else raise a TypeCastError exception.
Returns the UInt value represented by given JSON::Any type, else raise a TypeCastError exception.
Returns the UInt value represented by given NamedTuple type, else raise a TypeCastError exception.
Returns the UInt value represented by given Nil type, else raise a TypeCastError exception.
Returns the UInt value represented by given String type, else raise a TypeCastError exception.
Returns the UInt value represented by given Symbol type, else raise a TypeCastError exception.
Returns the UInt value represented by given Time type, else raise a TypeCastError exception.
Returns the UInt value represented by given YAML::Any type, else raise a TypeCastError exception.
Returns the UInt16 value represented by given Array type, else raise a TypeCastError exception.
Returns the UInt16 value represented by given Bool type, else raise a TypeCastError exception.
Returns the UInt16 value represented by given Float type, else raise a TypeCastError exception.
Returns the UInt16 value represented by given Hash type, else raise a TypeCastError exception.
Returns the UInt16 value represented by given Int type, else raise a TypeCastError exception.
Returns the UInt16 value represented by given JSON::Any type, else raise a TypeCastError exception.
Returns the UInt16 value represented by given NamedTuple type, else raise a TypeCastError exception.
Returns the UInt16 value represented by given Nil type, else raise a TypeCastError exception.
Returns the UInt16 value represented by given String type, else raise a TypeCastError exception.
Returns the UInt16 value represented by given Symbol type, else raise a TypeCastError exception.
Returns the UInt16 value represented by given Time type, else raise a TypeCastError exception.
Returns the UInt16 value represented by given YAML::Any type, else raise a TypeCastError exception.
Returns the UInt16 or Nil value represented by given JSON::Any type.
Returns the UInt16 or Nil value represented by given YAML::Any type.
Returns the UInt32 value represented by given Array type, else raise a TypeCastError exception.
Returns the UInt32 value represented by given Bool type, else raise a TypeCastError exception.
Returns the UInt32 value represented by given Float type, else raise a TypeCastError exception.
Returns the UInt32 value represented by given Hash type, else raise a TypeCastError exception.
Returns the UInt32 value represented by given Int type, else raise a TypeCastError exception.
Returns the UInt32 value represented by given JSON::Any type, else raise a TypeCastError exception.
Returns the UInt32 value represented by given NamedTuple type, else raise a TypeCastError exception.
Returns the UInt32 value represented by given Nil type, else raise a TypeCastError exception.
Returns the UInt32 value represented by given String type, else raise a TypeCastError exception.
Returns the UInt32 value represented by given Symbol type, else raise a TypeCastError exception.
Returns the UInt32 value represented by given Time type, else raise a TypeCastError exception.
Returns the UInt32 value represented by given YAML::Any type, else raise a TypeCastError exception.
Returns the UInt64 value represented by given Array type, else raise a TypeCastError exception.
Returns the UInt64 value represented by given Bool type, else raise a TypeCastError exception.
Returns the UInt64 value represented by given Float type, else raise a TypeCastError exception.
Returns the UInt64 value represented by given Hash type, else raise a TypeCastError exception.
Returns the UInt64 value represented by given Int type, else raise a TypeCastError exception.
Returns the UInt64 value represented by given JSON::Any type, else raise a TypeCastError exception.
Returns the UInt64 value represented by given NamedTuple type, else raise a TypeCastError exception.
Returns the UInt64 value represented by given Nil type, else raise a TypeCastError exception.
Returns the UInt64 value represented by given String type, else raise a TypeCastError exception.
Returns the UInt64 value represented by given Symbol type, else raise a TypeCastError exception.
Returns the UInt64 value represented by given Time type, else raise a TypeCastError exception.
Returns the UInt64 value represented by given YAML::Any type, else raise a TypeCastError exception.
Returns the UInt64 or Nil value represented by given JSON::Any type.
Returns the UInt64 or Nil value represented by given YAML::Any type.
Returns the UInt8 value represented by given Array type, else raise a TypeCastError exception.
Returns the UInt8 value represented by given Bool type, else raise a TypeCastError exception.
Returns the UInt8 value represented by given Float type, else raise a TypeCastError exception.
Returns the UInt8 value represented by given Hash type, else raise a TypeCastError exception.
Returns the UInt8 value represented by given Int type, else raise a TypeCastError exception.
Returns the UInt8 value represented by given JSON::Any type, else raise a TypeCastError exception.
Returns the UInt8 value represented by given NamedTuple type, else raise a TypeCastError exception.
Returns the UInt8 value represented by given Nil type, else raise a TypeCastError exception.
Returns the UInt8 value represented by given String type, else raise a TypeCastError exception.
Returns the UInt8 value represented by given Symbol type, else raise a TypeCastError exception.
Returns the UInt8 value represented by given Time type, else raise a TypeCastError exception.
Returns the UInt8 value represented by given YAML::Any type, else raise a TypeCastError exception.