Sha256: 7a99e6c5ded6a917e82689401790309aee93997d78b68d64ecc0c99c6315d872

Contents?: true

Size: 469 Bytes

Versions: 3

Compression:

Stored size: 469 Bytes

Contents

require_relative "base_class"

module Oscal
  class Add < Oscal::BaseClass
    KEY = %i(position by_id title params props links parts)

    attr_accessor *KEY

    attr_serializable *KEY

    def set_value(key_name, val)
      case key_name
      when "params"
        Parameter.wrap(val)
      when "props"
        Property.wrap(val)
      when "links"
        Link.wrap(val)
      when "part"
        Part.wrap(val)
      else
        val
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
oscal-0.2.3 lib/oscal/add.rb
oscal-0.2.2 lib/oscal/add.rb
oscal-0.2.0 lib/oscal/add.rb