Sha256: a3ad8de3ae1e2d9b270916a4b4f3bbf54aeb9a854963a617174667352cd43fd7

Contents?: true

Size: 296 Bytes

Versions: 2

Compression:

Stored size: 296 Bytes

Contents

module StatsWhisper::Parser

  def parse(path)
    path = path.gsub(/\/(pl|en|(\d){4}\-(\d){4})/) do
      if $'.empty?
        '/'
      end
    end
    path.slice!(0) if path =~ /\/.+/
    path.sub(/^\/$/, "home_page").gsub('/', '.')
  end

  def build_key(*args)
    args.join(".")
  end

end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
stats_whisper-0.2.3 lib/stats_whisper/parser.rb
stats_whisper-0.2.2.1 lib/stats_whisper/parser.rb