Sha256: c5e41d9b6d3291cf85d78ea63eb5cc65f3fb81a63e9e0f8c16ce43119064a925
Contents?: true
Size: 324 Bytes
Versions: 1
Compression:
Stored size: 324 Bytes
Contents
module Prosperity class MetricFinder < Struct.new(:directory) def metrics Dir[File.join(directory, "**/*_metric.rb")].map do |metric| File.basename(metric, ".rb").camelcase.constantize end end def self.all self.new(File.join(Rails.root, "app/prosperity")).metrics end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
prosperity-0.0.1 | lib/prosperity/metric_finder.rb |