Method: Inspec::List#map
- Defined in:
- lib/inspec/objects/list.rb
#map {|t| ... } ⇒ Object
3 4 5 6 7 8 9 10 11 |
# File 'lib/inspec/objects/list.rb', line 3 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 |