Class: OsoCloud::Core::PolicyMetadata

Inherits:
Object
  • Object
show all
Defined in:
lib/oso/api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(resources:) ⇒ PolicyMetadata

Returns a new instance of PolicyMetadata.



56
57
58
59
60
61
62
63
64
# File 'lib/oso/api.rb', line 56

def initialize(resources:)
  @resources = resources.map do |k, v|
    if v.is_a? 
      [k, v]
    else
      [k, .new(**v)]
    end
  end.to_h
end

Instance Attribute Details

#resourcesObject (readonly)

Returns the value of attribute resources.



54
55
56
# File 'lib/oso/api.rb', line 54

def resources
  @resources
end