Sha256: e54aae634a268377e1493e2ccdcfb574cbd6bf04af4a0d62fe212d543c00c72f

Contents?: true

Size: 1 KB

Versions: 43

Compression:

Stored size: 1 KB

Contents

# frozen_string_literal: true

module Files
  class Release
    attr_reader :options, :attributes

    def initialize(attributes = {}, options = {})
      @attributes = attributes || {}
      @options = options || {}
    end

    # string - Native release description
    def description
      @attributes[:description]
    end

    # array - A list of native release packages
    def native_release_packages
      @attributes[:native_release_packages]
    end

    # string - Native release title
    def title
      @attributes[:title]
    end

    # string - Native release version
    def version
      @attributes[:version]
    end

    # Parameters:
    #   platform - string
    def self.get_latest(params = {}, options = {})
      raise InvalidParameterError.new("Bad parameter: platform must be an String") if params.dig(:platform) and !params.dig(:platform).is_a?(String)

      response, options = Api.send_request("/releases/latest", :get, params, options)
      Release.new(response.data, options)
    end
  end
end

Version data entries

43 entries across 43 versions & 1 rubygems

Version Path
files.com-1.0.49 lib/files.com/models/release.rb
files.com-1.0.48 lib/files.com/models/release.rb
files.com-1.0.47 lib/files.com/models/release.rb
files.com-1.0.46 lib/files.com/models/release.rb
files.com-1.0.45 lib/files.com/models/release.rb
files.com-1.0.44 lib/files.com/models/release.rb
files.com-1.0.43 lib/files.com/models/release.rb
files.com-1.0.42 lib/files.com/models/release.rb
files.com-1.0.41 lib/files.com/models/release.rb
files.com-1.0.40 lib/files.com/models/release.rb
files.com-1.0.39 lib/files.com/models/release.rb
files.com-1.0.38 lib/files.com/models/release.rb
files.com-1.0.37 lib/files.com/models/release.rb
files.com-1.0.36 lib/files.com/models/release.rb
files.com-1.0.35 lib/files.com/models/release.rb
files.com-1.0.34 lib/files.com/models/release.rb
files.com-1.0.33 lib/files.com/models/release.rb
files.com-1.0.32 lib/files.com/models/release.rb
files.com-1.0.31 lib/files.com/models/release.rb
files.com-1.0.30 lib/files.com/models/release.rb