module BrainstemAdaptor
Constants
- VERSION
Public Class Methods
default_specification()
click to toggle source
@return [BrainstemAdaptor::Specification]
# File lib/brainstem-adaptor.rb, line 28 def self.default_specification BrainstemAdaptor::Specification[:default] end
load_specification(path)
click to toggle source
@param path [String] Path to YML specification file
# File lib/brainstem-adaptor.rb, line 38 def self.load_specification(path) self.specification = YAML::load_file(path) end
parser()
click to toggle source
# File lib/brainstem-adaptor.rb, line 16 def self.parser @parser ||= JSON end
parser=(parser)
click to toggle source
@param parser Any JSON parser @raise [ArgumentError] if parser does not respond to parse
# File lib/brainstem-adaptor.rb, line 22 def self.parser=(parser) raise ArgumentError, 'Parser must respond to #parse message' unless parser.respond_to?(:parse) @parser = parser end
specification=(specification)
click to toggle source
@param specification [Hash]
# File lib/brainstem-adaptor.rb, line 33 def self.specification=(specification) BrainstemAdaptor::Specification[:default] = specification end