Class: TypedData::KeyFormatter
- Inherits:
-
Object
- Object
- TypedData::KeyFormatter
- Defined in:
- lib/typed_data/key_formatter.rb
Defined Under Namespace
Classes: UnknownFormatter
Constant Summary collapse
- UNION_TYPE_KEY_FORMATTERS =
{ bigquery: ->(type) { "#{type}_value" }, avro: ->(type) { type.split("_").first }, }
Class Method Summary collapse
Class Method Details
.find(formatter) ⇒ Object
11 12 13 14 15 |
# File 'lib/typed_data/key_formatter.rb', line 11 def self.find(formatter) UNION_TYPE_KEY_FORMATTERS.fetch(formatter) do raise UnknownFormatter, "Unknown formatter: #{formatter}" end end |