Sha256: f9b237a3dea6f06542a46d5bd32470c7cf8a4322c5fced3c83f135becadfb673
Contents?: true
Size: 539 Bytes
Versions: 2
Compression:
Stored size: 539 Bytes
Contents
require "indieweb/post_types/identifier/scrobble/version" module Indieweb module PostTypes module Identifier module Scrobble def self.type_from(data) data = entry_data_from(data) return unless data.key?('scrobble-of') 'scrobble' end private def self.entry_data_from(data) return data['properties'] if data['properties'] return data unless data.key?('items') data['items'].first['properties'] end end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
indieweb-post_types-identifier-scrobble-0.2.1 | lib/indieweb/post_types/identifier/scrobble.rb |
indieweb-post_types-identifier-scrobble-0.2.0 | lib/indieweb/post_types/identifier/scrobble.rb |