Method: Inspec::Requirement#to_hash
- Defined in:
- lib/inspec/dependencies/requirement.rb
#to_hash ⇒ Object
83 84 85 86 87 88 89 90 91 92 93 94 95 |
# File 'lib/inspec/dependencies/requirement.rb', line 83 def to_hash h = { 'name' => name, 'resolved_source' => resolved_source, 'version_constraints' => version_constraints, } if !dependencies.empty? h['dependencies'] = dependencies.map(&:to_hash) end h end |