Class: SunspotCell::FieldFactory::Attachment

Inherits:
Object
  • Object
show all
Defined in:
lib/sunspot_cell/field_factory.rb

Instance Method Summary collapse

Constructor Details

#initialize(name = nil, &block) ⇒ Attachment

Returns a new instance of Attachment.



5
6
7
8
9
10
11
# File 'lib/sunspot_cell/field_factory.rb', line 5

def initialize(name = nil, &block)
  if block
    @data_extractor = DataExtractor::BlockExtractor.new(&block)
  else
    @data_extractor = DataExtractor::AttributeExtractor.new(name)
  end
end

Instance Method Details

#populate_document(document, model) ⇒ Object



13
14
# File 'lib/sunspot_cell/field_factory.rb', line 13

def populate_document(document, model)
end