Method: Inspec::Input#to_hash
- Defined in:
- lib/inspec/objects/input.rb
#to_hash ⇒ Object
————————————————————————–#
Marshalling
————————————————————————–#
310 311 312 313 314 315 316 317 318 319 |
# File 'lib/inspec/objects/input.rb', line 310 def to_hash as_hash = { name: name, options: {} } %i{description title identifier type required value}.each do |field| val = send(field) next if val.nil? as_hash[:options][field] = val end as_hash end |