class Calypso::ParserProxy

Proxy class for the Calypso configuration parser.

Public Class Methods

new(type, file) click to toggle source

Create a new parser proxy instance.

@param type [Symbol] Parser type. @param file [String] Path to configuration file.

# File lib/calypso/parserproxy.rb, line 30
def initialize(type, file)
  @file = File.expand_path(file)
  @parser = case type
            when :yaml
              YAMLParser.new(@file)
            else
              nil
            end
end

Public Instance Methods

hardware() click to toggle source

Get the available hardware.

@return [Hash] Hash of the available hardware.

# File lib/calypso/parserproxy.rb, line 48
def hardware
  @parser.hardware
end
parse() click to toggle source

Parse the config file.

# File lib/calypso/parserproxy.rb, line 41
def parse
  @parser.parse
end
tests() click to toggle source

Get a hash containing all tests.

@return [Hash] All available unit tests.

# File lib/calypso/parserproxy.rb, line 55
def tests
  @parser.tests
end