Method: Inspec::Rule#ref

Defined in:
lib/inspec/rule.rb

#ref(ref = nil, opts = {}) ⇒ Object



91
92
93
94
95
96
97
98
99
# File 'lib/inspec/rule.rb', line 91

def ref(ref = nil, opts = {})
  return @refs if ref.nil? && opts.empty?
  if opts.empty? && ref.is_a?(Hash)
    opts = ref
  else
    opts[:ref] = ref
  end
  @refs.push(opts)
end