Method: Ferret::Document::Field#string_value
- Defined in:
- lib/ferret/document/field.rb
#string_value ⇒ Object
Returns the string value of the data that is stored in this field
233 234 235 236 237 238 239 240 241 242 |
# File 'lib/ferret/document/field.rb', line 233 def string_value if @data.instance_of? String return @data elsif @data.respond_to? :read return @data.read() else # if it is binary object try to return a string representation return @data.to_s end end |