class Fuey::TraceRepository

Public Instance Methods

all() click to toggle source
# File lib/fuey_client/fuey/trace_repository.rb, line 5
def all
  traces ||= Config::Fuey.traces.keys.map do |trace_name|
    fetch trace_name
  end
end
fetch(trace_name) click to toggle source
# File lib/fuey_client/fuey/trace_repository.rb, line 11
def fetch(trace_name)
  trace = Trace.new :name => trace_name
  Config::Fuey.traces.send(trace_name).each do |step|
    inspection_class = ActiveSupport::Inflector.constantize %(Fuey::Inspections::#{step.keys.first})
    inspection = inspection_class.new(step.values.first)
    trace.add_step inspection
  end
  trace
end