Module: KafoParsers::Parsers

Defined in:
lib/kafo_parsers/parsers.rb

Class Method Summary collapse

Class Method Details

.allObject



5
6
7
# File 'lib/kafo_parsers/parsers.rb', line 5

def self.all
  [ PuppetStringsModuleParser ]
end

.find_available(options = {}) ⇒ Object



9
10
11
12
13
14
15
16
17
18
# File 'lib/kafo_parsers/parsers.rb', line 9

def self.find_available(options = {})
  all.find do |provider|
    begin
      provider.available?
    rescue ParserNotAvailable => e
      options[:logger].debug "Provider #{provider} not available: #{e.message}" if options[:logger]
      false
    end
  end
end