Module: ActsAsFerret::RdigAdapter::InstanceMethods
- Defined in:
- lib/rdig_adapter.rb
Instance Method Summary collapse
-
#content ⇒ Object
Content of the document.
- #ferret_key_with_md5 ⇒ Object
-
#id ⇒ Object
Url of this document.
- #initialize(uri, rdig_document = nil) ⇒ Object
-
#title ⇒ Object
Title of the document.
- #to_s ⇒ Object
Instance Method Details
#content ⇒ Object
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_md5 ⇒ Object
138 139 140 |
# File 'lib/rdig_adapter.rb', line 138 def ferret_key_with_md5 Digest::MD5.hexdigest(ferret_key_without_md5) end |
#id ⇒ Object
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 |
#title ⇒ Object
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_s ⇒ Object
142 143 144 |
# File 'lib/rdig_adapter.rb', line 142 def to_s "Page at #{id}, title: #{title}" end |