Module: ReciteCSV::Header::Definition
- Defined in:
- lib/recite_csv/header/definition.rb
Defined Under Namespace
Classes: Array, Base, Hash
Constant Summary
collapse
- DEFINITIONS =
{
::Hash => Hash,
::Array => Array
}.freeze
Class Method Summary
collapse
Class Method Details
.dispatch(header_definition) ⇒ Object
67
68
69
70
71
|
# File 'lib/recite_csv/header/definition.rb', line 67
def dispatch()
_, definition_class = DEFINITIONS.find { |klass, _| .is_a? klass }
raise ::ArgumentError, "Unexpected header definition type" unless definition_class
definition_class.new()
end
|