Sha256: 3cc0bd919bb6f0d30da62fde2612f26d11801fb806df63cf786f2bb391230dc2

Contents?: true

Size: 396 Bytes

Versions: 2

Compression:

Stored size: 396 Bytes

Contents

#!/usr/bin/env ruby

require 'psych'
require 'yamlquery'

options = YamlQuery::Settings.get_options

Dir.glob(options[:yamlpath]).each do |file|
  if File.file?(file)
    if yaml = Psych.load_file(file)
      yq = YamlQuery.new(yaml, options)
      results = yq.object_search
      if ! results.empty?
        YamlQuery::Output.display_results(file, results, options)
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
yamlquery-0.0.2 bin/yq
yamlquery-0.0.1 bin/yq