Sha256: 38b2f3cf7398a513339006fd6f23a6c3517437e2d22f7e1bb6161bcf2217fbe2
Contents?: true
Size: 910 Bytes
Versions: 1
Compression:
Stored size: 910 Bytes
Contents
# Fastly::ValueField ## Class instance methods ### `fastly_one_of` Returns the list of classes defined in oneOf. #### Example ```ruby require 'fastly' Fastly::ValueField.fastly_one_of # => # [ # :'Array<Float>', # :'Array<Integer>', # :'Array<String>', # :'Boolean', # :'Float', # :'Integer', # :'String' # ] ``` ### build Find the appropriate object from the `fastly_one_of` list and casts the data into it. #### Example ```ruby require 'fastly' Fastly::ValueField.build(data) # => #<Array<Float>:0x00007fdd4aab02a0> Fastly::ValueField.build(data_that_doesnt_match) # => nil ``` #### Parameters | Name | Type | Description | | ---- | ---- | ----------- | | **data** | **Mixed** | data to be matched against the list of oneOf items | #### Return type - `Array<Float>` - `Array<Integer>` - `Array<String>` - `Boolean` - `Float` - `Integer` - `String` - `nil` (if no type matches)
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
fastly-9.0.0 | docs/ValueField.md |