class ShareNotify::SearchResponse::Document
Attributes
doc[R]
Public Class Methods
new(doc)
click to toggle source
# File lib/share_notify/search_response.rb, line 24 def initialize(doc) @doc = doc end
Public Instance Methods
canonical_uri()
click to toggle source
# File lib/share_notify/search_response.rb, line 60 def canonical_uri return if uris.nil? uris.fetch('canonicalUri', nil) end
contributors()
click to toggle source
# File lib/share_notify/search_response.rb, line 28 def contributors doc.fetch('contributors', []) end
doc_id()
click to toggle source
# File lib/share_notify/search_response.rb, line 40 def doc_id return if properties.nil? properties.fetch('docID', nil) end
properties()
click to toggle source
# File lib/share_notify/search_response.rb, line 36 def properties doc.fetch('shareProperties', nil) end
provider_uris()
click to toggle source
# File lib/share_notify/search_response.rb, line 65 def provider_uris return if uris.nil? uris.fetch('providerUris', []) end
source()
click to toggle source
# File lib/share_notify/search_response.rb, line 45 def source return if properties.nil? properties.fetch('source', nil) end
title()
click to toggle source
# File lib/share_notify/search_response.rb, line 32 def title doc.fetch('title', nil) end
updated()
click to toggle source
# File lib/share_notify/search_response.rb, line 50 def updated time_string = doc.fetch('providerUpdatedDateTime', nil) return if time_string.nil? Time.parse(time_string) end
uris()
click to toggle source
# File lib/share_notify/search_response.rb, line 56 def uris doc.fetch('uris', nil) end