Sha256: 861c822bb9a8bd8b6b69b716a261621b5c92eb6e8e08d1138e2f62a2751ca1fe
Contents?: true
Size: 558 Bytes
Versions: 30
Compression:
Stored size: 558 Bytes
Contents
class RestModel module Source module Path def self.resolve(options, convert_input_keys = Key::Converter::DefaultHandler) convert_input_keys.call keys_for_path(custom_path(options)) end private def self.custom_path(options) options.slice(:start_key, :field) end def self.keys_for_path(path) return [] if path.empty? if path.values.first.kind_of?(Symbol) [path.values.first] else path.values.first.to_s.split('.') end end end end end
Version data entries
30 entries across 30 versions & 1 rubygems