Class: SearchResult

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

Instance Method Summary collapse

Constructor Details

#initialize(another_hash) ⇒ SearchResult

Returns a new instance of SearchResult.



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

def initialize another_hash
  merge! another_hash
end

Instance Method Details

#company?Boolean

Returns:

  • (Boolean)


6
7
8
# File 'lib/search_result.rb', line 6

def company?
  self[:company] == true
end

#person?Boolean

Returns:

  • (Boolean)


10
11
12
# File 'lib/search_result.rb', line 10

def person?
  self[:person] == true
end