Module: Inspec::Object::RubyHelper

Included in:
Describe, Test, Value
Defined in:
lib/inspec/objects/ruby_helper.rb

Instance Method Summary collapse

Instance Method Details

#ruby_qualifier(q) ⇒ Object



5
6
7
8
9
10
11
12
13
# File 'lib/inspec/objects/ruby_helper.rb', line 5

def ruby_qualifier(q)
  if q.length <= 1
    q[0]
  elsif q[0] == "map" && q.length == 2
    q[0] + " " + q[1]
  else
    q[0] + "(" + q[1..-1].map(&:inspect).join(", ") + ")"
  end
end