Sha256: 54000d2ec589c505ece43822662f49a6563c2f03823b3401b626cc9ff5e61df0

Contents?: true

Size: 442 Bytes

Versions: 4

Compression:

Stored size: 442 Bytes

Contents

##
# NPR::Entity::Permissions
#
# Audio permissions
#
module NPR
  module Entity
    class Permissions < Base
      attr_accessor :download, :stream, :embed
      
      def initialize(json)
        @download = json["download"]["allow"] == "true" if json["download"]
        @stream   = json["stream"]["allow"]   == "true" if json["stream"]
        @embed    = json["embed"]["allow"]    == "true" if json["embed"]
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
npr-1.1.0 lib/npr/entity/permissions.rb
npr-0.1.2 lib/npr/entity/permissions.rb
npr-0.1.1 lib/npr/entity/permissions.rb
npr-0.1.0 lib/npr/entity/permissions.rb