Sha256: 01962998a1ea089a7e7324f2251c7d896044134ab25e9f14a891426dba121653

Contents?: true

Size: 1.26 KB

Versions: 1

Compression:

Stored size: 1.26 KB

Contents

require "shale"
require_relative "./identifier"

module Modspec

  class ConformanceTest < Shale::Mapper
    attribute :identifier, Identifier
    attribute :name, Shale::Type::String
    attribute :dependencies, Identifier, collection: true
    attribute :targets, Identifier, collection: true
    attribute :belongs_to, Identifier, collection: true
    attribute :description, Shale::Type::String
    attribute :guidance, Shale::Type::String, collection: true
    attribute :purpose, Shale::Type::String
    attribute :method, Shale::Type::String # Inspection, etc.
    attribute :type, Shale::Type::String
    attribute :reference, Shale::Type::String
    attribute :abstract, Shale::Type::Boolean

    xml do
      root "conformance-test"
      map_attribute "identifier", to: :identifier
      map_attribute "abstract", to: :abstract
      map_element "name", to: :name
      map_element "targets", to: :targets
      map_element "dependencies", to: :dependencies
      map_element "belongs_to", to: :belongs_to
      map_element "description", to: :description
      map_element "guidance", to: :guidance
      map_element "purpose", to: :purpose
      map_element "method", to: :method
      map_element "type", to: :type
      map_element "reference", to: :reference
    end
  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
modspec-0.1.0 lib/modspec/conformance_test.rb