Sha256: 52091d19814f7714312841ab33e3a215f94711e8ca554f0e49badb1afb67f560

Contents?: true

Size: 553 Bytes

Versions: 7

Compression:

Stored size: 553 Bytes

Contents

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

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

    attribute :source, VolumeSnapshot

    # returns VolumeSnapshot::Collection if exists
    attribute :snapshots, Praxis::Collection.of(VolumeSnapshot)

    links do
      link :source
      link :snapshots
    end

  end

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

  view :link do
    attribute :id
  end

end


Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
praxis-0.13.0 spec/spec_app/design/media_types/volume.rb
praxis-0.11.2 spec/spec_app/design/media_types/volume.rb
praxis-0.11.1 spec/spec_app/design/media_types/volume.rb
praxis-0.11 spec/spec_app/design/media_types/volume.rb
praxis-0.11pre spec/spec_app/design/media_types/volume.rb
praxis-0.10.1 spec/spec_app/design/media_types/volume.rb
praxis-0.10.0 spec/spec_app/design/media_types/volume.rb