Class: AdnHashtagPhotos::Uploader::Core

Inherits:
Base
  • Object
show all
Defined in:
lib/adn_hashtag_photos/uploader/core.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Base

#initialize

Constructor Details

This class inherits a constructor from AdnHashtagPhotos::Uploader::Base

Class Method Details

.detected?(annotations) ⇒ Boolean

Parameters:

  • annotations (Array)

Returns:

  • (Boolean)


5
6
7
8
9
# File 'lib/adn_hashtag_photos/uploader/core.rb', line 5

def self.detected? annotations
  annotations.any?{|item|
    item[:type] == 'net.app.core.oembed'
  }
end

Instance Method Details

#thumbnail_urlObject



11
12
13
14
15
# File 'lib/adn_hashtag_photos/uploader/core.rb', line 11

def thumbnail_url
  @annotations.detect{|annotation|
    annotation[:type] == 'net.app.core.oembed'
  }[:value][:thumbnail_url]
end