class Ravanello::Analyzer

Analyzes data by router

Public Class Methods

new(router, data) click to toggle source
# File lib/ravanello/analyzer.rb, line 6
def initialize(router, data)
  @data = data
  @router = router
end

Public Instance Methods

call() click to toggle source
# File lib/ravanello/analyzer.rb, line 11
def call
  statistics = Ravanello::Statistics.new

  @data.each do |redis_key|
    end_point = resolver.call(redis_key.name)
    statistics.append(end_point.to_s, redis_key)
  end

  statistics
end

Private Instance Methods

resolver() click to toggle source
# File lib/ravanello/analyzer.rb, line 24
def resolver
  @resolver ||= Ravanello::Resolver.new(@router)
end