Sha256: 48bceeba593b64e35d0b12b706e60348649386db14a84b9598143673970a7180

Contents?: true

Size: 333 Bytes

Versions: 166

Compression:

Stored size: 333 Bytes

Contents

# encoding:utf-8

module Inspec
  class List < Value
    def map
      raise 'Inspec::List.map needs to be called with a block' unless block_given?
      t = List.new
      t.qualifier = [['x']]
      yield(t)
      return if t.qualifier == [['x']]
      @qualifier.push(['map', "{ |x| #{t.to_ruby} }"])
      self
    end
  end
end

Version data entries

166 entries across 166 versions & 2 rubygems

Version Path
inspec-core-4.3.2 lib/inspec/objects/list.rb
inspec-4.3.2 lib/inspec/objects/list.rb
inspec-core-4.2.0.preview lib/inspec/objects/list.rb
inspec-4.2.0.preview lib/inspec/objects/list.rb
inspec-core-4.1.4.preview lib/inspec/objects/list.rb
inspec-4.1.4.preview lib/inspec/objects/list.rb
inspec-core-3.9.3 lib/inspec/objects/list.rb
inspec-3.9.3 lib/inspec/objects/list.rb
inspec-core-3.9.0 lib/inspec/objects/list.rb
inspec-3.9.0 lib/inspec/objects/list.rb
inspec-core-3.7.11 lib/inspec/objects/list.rb
inspec-3.7.11 lib/inspec/objects/list.rb
inspec-core-3.7.1 lib/inspec/objects/list.rb
inspec-3.7.1 lib/inspec/objects/list.rb
inspec-core-3.6.6 lib/inspec/objects/list.rb
inspec-3.6.6 lib/inspec/objects/list.rb
inspec-core-3.6.4 lib/inspec/objects/list.rb
inspec-3.6.4 lib/inspec/objects/list.rb
inspec-core-2.3.28 lib/inspec/objects/list.rb
inspec-2.3.28 lib/inspec/objects/list.rb