Class: Srchio::Result

Inherits:
Object
  • Object
show all
Defined in:
lib/srchio/result.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(result = {}) ⇒ Result

Returns a new instance of Result.



5
6
7
8
9
10
11
12
13
# File 'lib/srchio/result.rb', line 5

def initialize(result={})
  @title = result['title']
  @highlight = result['highlight']
  @url = result['url']
  @tags = result['tags']
  @remote_id = result['remote_id']
  @index_id = result['index_id']
  @created = result['created']
end

Instance Attribute Details

#createdObject

Returns the value of attribute created.



3
4
5
# File 'lib/srchio/result.rb', line 3

def created
  @created
end

#highlightObject

Returns the value of attribute highlight.



3
4
5
# File 'lib/srchio/result.rb', line 3

def highlight
  @highlight
end

#index_idObject

Returns the value of attribute index_id.



3
4
5
# File 'lib/srchio/result.rb', line 3

def index_id
  @index_id
end

#remote_idObject

Returns the value of attribute remote_id.



3
4
5
# File 'lib/srchio/result.rb', line 3

def remote_id
  @remote_id
end

#tagsObject

Returns the value of attribute tags.



3
4
5
# File 'lib/srchio/result.rb', line 3

def tags
  @tags
end

#titleObject

Returns the value of attribute title.



3
4
5
# File 'lib/srchio/result.rb', line 3

def title
  @title
end

#urlObject

Returns the value of attribute url.



3
4
5
# File 'lib/srchio/result.rb', line 3

def url
  @url
end