Sha256: 7c0710bc8045b3e67f6a849a20c63b435e7a065c6ebd02c534082b29745d7400

Contents?: true

Size: 966 Bytes

Versions: 1

Compression:

Stored size: 966 Bytes

Contents

module LayerVault
  class Revision < LayerVault::Model
    class << self
      def for(organization, project, folder_path, file_name, revision)
        resp = MultiJson.decode(LayerVault.client.revision(organization, project, folder_path, file_name, revision))
        instance = new(resp)
        instance.set_context(organization: organization, project: project, folder_path: folder_path, file_name: file_name, revision: revision)
      end
    end

    def preview(width, height)
      LayerVault.client.preview(context.organization, context.project, context.folder_path, context.file_name, context.revision, w: width, h: height)
    end

    def meta
      LayerVault.client.meta(context.organization, context.project, context.folder_path, context.file_name, context.revision)
    end

    def feedback_items
      LayerVault.client.feedback_items(context.organization, context.project, context.folder_path, context.file_name, context.revision)
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
layervault-0.1.2 lib/layervault/revision.rb