Sha256: b89a6548435cd371108e134cae5e9ebf15d2605805e9bbeccb224d1ec0cd2e57

Contents?: true

Size: 300 Bytes

Versions: 6

Compression:

Stored size: 300 Bytes

Contents

# encoding: utf-8

module Inspec
  module RubyHelper
    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
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
inspec-2.1.81 lib/inspec/objects/ruby_helper.rb
inspec-2.1.21 lib/inspec/objects/ruby_helper.rb
inspec-2.1.10 lib/inspec/objects/ruby_helper.rb
inspec-2.0.32 lib/inspec/objects/ruby_helper.rb
inspec-2.0.17 lib/inspec/objects/ruby_helper.rb
inspec-1.51.15 lib/inspec/objects/ruby_helper.rb