Sha256: 26a008300f9d6611fac97b1af9944dcb4ad4ed639db0cc52eb5ecb705f007d6b

Contents?: true

Size: 821 Bytes

Versions: 11

Compression:

Stored size: 821 Bytes

Contents

module Puree
  module Model

    # Description of a file.
    #
    class File < Puree::Model::Structure

      # @return [String, nil]
      attr_reader :name

      # @return [String, nil]
      attr_reader :mime

      # @return [Integer, nil]
      attr_accessor :size

      # @return [String, nil]
      attr_reader :url

      # @return [Puree::Model::CopyrightLicense, nil]
      attr_reader :license

      # @param v [String]
      def name=(v)
        @name = v if v && !v.empty?
      end

      # @param v [String]
      def mime=(v)
        @mime = v if v && !v.empty?
      end

      # @param v [String]
      def url=(v)
        @url = v if v && !v.empty?
      end

      # @param v [Puree::Model::CopyrightLicense]
      def license=(v)
        @license = v if v && v.data?
      end

    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
puree-2.9.2 lib/puree/model/file.rb
puree-2.9.1 lib/puree/model/file.rb
puree-2.9.0 lib/puree/model/file.rb
puree-2.8.1 lib/puree/model/file.rb
puree-2.8.0 lib/puree/model/file.rb
puree-2.7.0 lib/puree/model/file.rb
puree-2.6.0 lib/puree/model/file.rb
puree-2.5.1 lib/puree/model/file.rb
puree-2.5.0 lib/puree/model/file.rb
puree-2.4.0 lib/puree/model/file.rb
puree-2.3.0 lib/puree/model/file.rb