Sha256: 430f7e6c31a4fdd10318d270b924fa7708453ed50e02556ba2d3d866a9ced403
Contents?: true
Size: 464 Bytes
Versions: 19
Compression:
Stored size: 464 Bytes
Contents
module Elastic::Types module NestableType def nested(_name, using: nil, target: nil, &_block) unless _block.nil? using = Class.new(Elastic::NestedType, &_block) using.target = (target || _name.to_s.singularize.camelize.constantize) rescue nil end using = (_name.to_s.singularize + '_index').camelize.constantize if using.nil? pre_definition.register_field Elastic::Fields::Nested.new(_name, using) end end end
Version data entries
19 entries across 19 versions & 1 rubygems