Sha256: 406c6ff73729320afc3cfb595cd72fe9571848d9ef5159a0e7779977627e97ac

Contents?: true

Size: 378 Bytes

Versions: 10

Compression:

Stored size: 378 Bytes

Contents

module Cloudfuji
  # Cloudfuji::Bar
  class Bar
    # Default to showing the bar on all paths
    @@bar_paths = [/.*/]

    def self.set_bar_display_paths(*paths)
      @@bar_paths = paths
    end

    def self.in_bar_display_path?(env)
      @@bar_paths.each do |path_regex|
        return true if env['PATH_INFO'] =~ path_regex
      end

      return false
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
cloudfuji-0.0.46 lib/cloudfuji/bar.rb
cloudfuji-0.0.45 lib/cloudfuji/bar.rb
cloudfuji-0.0.44 lib/cloudfuji/bar.rb
cloudfuji-0.0.43 lib/cloudfuji/bar.rb
cloudfuji-0.0.42 lib/cloudfuji/bar.rb
cloudfuji-0.0.41 lib/cloudfuji/bar.rb
cloudfuji-0.0.40 lib/cloudfuji/bar.rb
cloudfuji-0.0.39 lib/cloudfuji/bar.rb
cloudfuji-0.0.38 lib/cloudfuji/bar.rb
cloudfuji-0.0.37 lib/cloudfuji/bar.rb