Class: Fuey::TraceRepository
- Inherits:
-
Object
- Object
- Fuey::TraceRepository
- Defined in:
- lib/fuey_client/fuey/trace_repository.rb
Instance Method Summary collapse
Instance Method Details
#all ⇒ Object
5 6 7 8 9 |
# 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) ⇒ Object
11 12 13 14 15 16 17 18 19 |
# 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 |