Class: DropboxApi::Results::SearchResult
- Defined in:
- lib/dropbox_api/results/search_result.rb
Instance Method Summary collapse
-
#has_more? ⇒ Boolean
Used for paging.
-
#matches ⇒ Object
A list (possibly empty) of matches for the query.
-
#start ⇒ Object
Used for paging.
Methods inherited from Base
Constructor Details
This class inherits a constructor from DropboxApi::Results::Base
Instance Method Details
#has_more? ⇒ Boolean
Used for paging. If true, indicates there is another page of results available that can be fetched by calling search again.
18 19 20 |
# File 'lib/dropbox_api/results/search_result.rb', line 18 def has_more? @data["more"].to_s == "true" end |
#matches ⇒ Object
A list (possibly empty) of matches for the query.
4 5 6 7 8 |
# File 'lib/dropbox_api/results/search_result.rb', line 4 def matches @matches ||= @data["matches"].map do |match| DropboxApi::Results::Search::Match.new match end end |
#start ⇒ Object
Used for paging. Value to set the start argument to when calling search to fetch the next page of results.
12 13 14 |
# File 'lib/dropbox_api/results/search_result.rb', line 12 def start @data["start"].to_i end |