lib/ecomdev/chefspec/helpers/platform.rb
def filter(*conditions)
      latest = !conditions.select {|item| item === true }.empty?
      filters = translate_conditions(conditions)
      items = list(latest)
      unless filters.empty?
        items = items.select do |item|
          !filters.select {|filter| match_filter(filter, item) }.empty?
        end

      end
      items
    end
# Returns list of available os versions filtered by conditions
#
# Each condition is treated as OR operation
# If no condition is specified all items are listed
# If TrueClass is supplied as one of the arguments it filters only last versions
#
Returns list of available os versions filtered by conditions
Each condition is treated as OR operation
If no condition is specified all items are listed
If TrueClass is supplied as one of the arguments it filters only last versions
Returns list of available os versions filtered by conditions Each condition is treated as OR operation If no condition is specified all items are listed If TrueClass is supplied as one of the arguments it filters only last versions
def filter(*conditions)
      latest = !conditions.select {|item| item === true }.empty?
      filters = translate_conditions(conditions)
      items = list(latest)
      unless filters.empty?
        items = items.select do |item|
          !filters.select {|filter| match_filter(filter, item) }.empty?
        end
      end
      items
    end
def filter ( * conditions ) latest = ! conditions . select { | item | item === true } . empty? filters = translate_conditions ( conditions ) items = list ( latest ) unless filters . empty? items = items . select do | item | ! filters . select { | filter | match_filter ( filter , item ) } . empty? end end items end
Returns list of available os versions filtered by conditions
Each condition is treated as OR operation
If no condition is specified all items are listed
If TrueClass is supplied as one of the arguments it filters only last versions
Returns list of available os versions filtered by conditions Each condition is treated as OR operation If no condition is specified all items are listed If TrueClass is supplied as one of the arguments it filters only last versions
conditions