Sha256: cc4e4f5cd75da6dacab68068909d7e44b3f3cdefce88e9f787be2576f06d5d1e

Contents?: true

Size: 460 Bytes

Versions: 18

Compression:

Stored size: 460 Bytes

Contents

# frozen_string_literal: true

class Instance < Praxis::MediaType
  identifier 'application/vnd.acme.instance'

  attributes do
    attribute :id, Integer
    attribute :name, String,
              example: /[:first_name:]/,
              regexp: /^\w+$/

    attribute :href, String

    attribute :root_volume, Volume, null: true

    attribute :volumes, Volume::Collection
  end

  default_fieldset do
    attribute :id
    attribute :root_volume
  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
praxis-2.0.pre.36 spec/spec_app/design/media_types/instance.rb
praxis-2.0.pre.35 spec/spec_app/design/media_types/instance.rb
praxis-2.0.pre.34 spec/spec_app/design/media_types/instance.rb
praxis-2.0.pre.33 spec/spec_app/design/media_types/instance.rb
praxis-2.0.pre.32 spec/spec_app/design/media_types/instance.rb
praxis-2.0.pre.31 spec/spec_app/design/media_types/instance.rb
praxis-2.0.pre.30 spec/spec_app/design/media_types/instance.rb
praxis-2.0.pre.29 spec/spec_app/design/media_types/instance.rb
praxis-2.0.pre.28 spec/spec_app/design/media_types/instance.rb
praxis-2.0.pre.27 spec/spec_app/design/media_types/instance.rb
praxis-2.0.pre.26 spec/spec_app/design/media_types/instance.rb
praxis-2.0.pre.25 spec/spec_app/design/media_types/instance.rb
praxis-2.0.pre.24 spec/spec_app/design/media_types/instance.rb
praxis-2.0.pre.23 spec/spec_app/design/media_types/instance.rb
praxis-2.0.pre.22 spec/spec_app/design/media_types/instance.rb
praxis-2.0.pre.21 spec/spec_app/design/media_types/instance.rb
praxis-2.0.pre.20 spec/spec_app/design/media_types/instance.rb
praxis-2.0.pre.19 spec/spec_app/design/media_types/instance.rb