Class: Fable::SearchResult

Inherits:
Object
  • Object
show all
Defined in:
lib/fable/search_result.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#approximateObject Also known as: approximate?

Returns the value of attribute approximate.



3
4
5
# File 'lib/fable/search_result.rb', line 3

def approximate
  @approximate
end

#objectObject

Returns the value of attribute object.



3
4
5
# File 'lib/fable/search_result.rb', line 3

def object
  @object
end

Instance Method Details

#containerObject



15
16
17
18
# File 'lib/fable/search_result.rb', line 15

def container
  return nil if !object.is_a?(Container)
  return object
end

#correct_objectObject



7
8
9
10
11
12
13
# File 'lib/fable/search_result.rb', line 7

def correct_object
  if approximate?
    return nil
  else
    return object
  end
end