Sha256: 01e1a101ceee58d11457b9735219b5e7f1e4822ce412590ea24d094b5e1a5b59

Contents?: true

Size: 559 Bytes

Versions: 4

Compression:

Stored size: 559 Bytes

Contents

class Volume < Praxis::MediaType
  identifier 'application/vnd.acme.volume'

  attributes do
    attribute :id, Integer
    attribute :name, String

    attribute :source, VolumeSnapshot

    attribute :snapshots, Praxis::Collection.of(VolumeSnapshot)
    attribute :snapshots_summary, VolumeSnapshot::CollectionSummary
  end

  view :default do
    attribute :id
    attribute :name
    attribute :source
    attribute :snapshots
  end

  class Collection < Praxis::Collection
    member_type Volume

    identifier 'application/vnd.acme.volumes'
  end

end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
praxis-2.0.pre.9 spec/spec_app/design/media_types/volume.rb
praxis-2.0.pre.8 spec/spec_app/design/media_types/volume.rb
praxis-2.0.pre.7 spec/spec_app/design/media_types/volume.rb
praxis-2.0.pre.6 spec/spec_app/design/media_types/volume.rb