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
73
74
75
76
77
78
79
80
|
# File 'lib/recite_csv/header/definition.rb', line 73
def dispatch()
_, definition_class = DEFINITIONS.find do |klass, _|
.is_a? klass
end
raise ::ArgumentError, "Unexpected header definition type" unless definition_class
definition_class.new()
end
|