Module: ActsAsFerret::RdigAdapter::InstanceMethods

Defined in:
lib/rdig_adapter.rb

Instance Method Summary collapse

Instance Method Details

#contentObject

Content of the document. Use the :content_tag_selector option to declare the hpricot expression that should be used for selecting the content for this field.



129
130
131
# File 'lib/rdig_adapter.rb', line 129

def content
  @rdig_document.body
end

#ferret_key_with_md5Object



138
139
140
# File 'lib/rdig_adapter.rb', line 138

def ferret_key_with_md5
  Digest::MD5.hexdigest(ferret_key_without_md5)
end

#idObject

Url of this document.



134
135
136
# File 'lib/rdig_adapter.rb', line 134

def id
  @id
end

#initialize(uri, rdig_document = nil) ⇒ Object



114
115
116
117
# File 'lib/rdig_adapter.rb', line 114

def initialize(uri, rdig_document = nil)
  @id = uri
  @rdig_document = rdig_document
end

#titleObject

Title of the document. Use the :title_tag_selector option to declare the hpricot expression that should be used for selecting the content for this field.



122
123
124
# File 'lib/rdig_adapter.rb', line 122

def title
  @rdig_document.title
end

#to_sObject



142
143
144
# File 'lib/rdig_adapter.rb', line 142

def to_s
  "Page at #{id}, title: #{title}"
end