Class: Inspec::Resources::Opa
- Inherits:
-
JsonConfig
- Object
- JsonConfig
- Inspec::Resources::Opa
- Defined in:
- lib/inspec/resources/opa.rb
Instance Attribute Summary
Attributes inherited from JsonConfig
Instance Method Summary collapse
-
#initialize(content) ⇒ Opa
constructor
A new instance of Opa.
- #result ⇒ Object
Methods inherited from JsonConfig
#method_missing, #resource_id, #to_s, #value
Methods included from FileReader
Methods included from ObjectTraverser
Constructor Details
#initialize(content) ⇒ Opa
Returns a new instance of Opa.
9 10 11 12 |
# File 'lib/inspec/resources/opa.rb', line 9 def initialize(content) @content = content super({ content: @content }) end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Inspec::Resources::JsonConfig
Instance Method Details
#result ⇒ Object
14 15 16 |
# File 'lib/inspec/resources/opa.rb', line 14 def result @content == {} || @content["result"].empty? ? nil : @content end |