Sha256: 8cb1e4ecd75cbd8c5f26665cca084acea33a4de543515c06cd3a139501d82909

Contents?: true

Size: 259 Bytes

Versions: 74

Compression:

Stored size: 259 Bytes

Contents

module Solr
  class Document
    def field_by_name(field_name)
      @fields.find { |field| field.name.to_s == field_name.to_s }
    end

    def fields_by_name(field_name)
      @fields.select { |field| field.name.to_s == field_name.to_s }
    end
  end
end

Version data entries

74 entries across 74 versions & 13 rubygems

Version Path
sunspot-2.7.1 spec/ext.rb
sunspot-2.7.0 spec/ext.rb
sunspot-2.6.0 spec/ext.rb
sunspot-2.5.0 spec/ext.rb
sunspot-2.4.0 spec/ext.rb
sunspot-2.3.0 spec/ext.rb
sunspot-2.2.8 spec/ext.rb
enju_leaf-1.2.1 vendor/bundle/ruby/2.3/gems/sunspot-2.2.7/spec/ext.rb
sunspot-2.2.7 spec/ext.rb
sunspot-2.2.6 spec/ext.rb
sunspot-2.2.5 spec/ext.rb
sunspot-2.2.4 spec/ext.rb
sunspot-2.2.3 spec/ext.rb
sunspot-2.2.2 spec/ext.rb
sunspot-2.2.1 spec/ext.rb
sunspot-2.2.0 spec/ext.rb
sunspot-2.1.1 spec/ext.rb
sunspot_stats-0.0.7 spec/ext.rb
sunspot-2.1.0 spec/ext.rb
sunspot_stats-0.0.6 spec/ext.rb