Sha256: 889ede16c47207cf7ce3d9706c37adbc1b0843adc9100b44d1e7c5d77c813f33

Contents?: true

Size: 664 Bytes

Versions: 3

Compression:

Stored size: 664 Bytes

Contents

require_relative "base_class"

module Oscal
  class Group < Oscal::BaseClass
    KEY = %i(id klass title params props links parts groups
             controls insert_controls)

    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 "parts"
        Part.wrap(val)
      when "groups"
        Group.wrap(val)
      when "controls"
        Control.wrap(val)
      when "insert_controls"
        InsertControl.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/group.rb
oscal-0.2.2 lib/oscal/group.rb
oscal-0.2.0 lib/oscal/group.rb