Sha256: fcfcc6529ed5459a1d3113b8d6083362046bd4c3f6e1e041ea8dc929492e8e19

Contents?: true

Size: 472 Bytes

Versions: 40

Compression:

Stored size: 472 Bytes

Contents

module Bizside
  module Configurations
    module Prefix

      def prefix(ending_slash = false)
        ret = ENV['X-BIZSIDE-PREFIX']

        if ret.to_s.empty?
          ret = self.prefix? ? self['prefix'] : '/'
        end

        if ret != '/'
          if ending_slash
            ret = ret + '/' unless ret.end_with?('/')
          else
            ret = ret[0..-2] if ret.end_with?('/')
          end
        end
        
        ret
      end

    end
  end
end

Version data entries

40 entries across 40 versions & 1 rubygems

Version Path
bizside-2.3.9 lib/bizside/configurations/prefix.rb
bizside-3.0.3 lib/bizside/configurations/prefix.rb
bizside-2.3.8 lib/bizside/configurations/prefix.rb
bizside-3.0.2 lib/bizside/configurations/prefix.rb
bizside-3.0.1 lib/bizside/configurations/prefix.rb
bizside-3.0.0 lib/bizside/configurations/prefix.rb
bizside-2.3.7 lib/bizside/configurations/prefix.rb
bizside-2.3.6 lib/bizside/configurations/prefix.rb
bizside-2.3.5 lib/bizside/configurations/prefix.rb
bizside-2.3.4 lib/bizside/configurations/prefix.rb
bizside-2.3.3 lib/bizside/configurations/prefix.rb
bizside-2.3.2 lib/bizside/configurations/prefix.rb
bizside-2.3.1 lib/bizside/configurations/prefix.rb
bizside-2.3.0 lib/bizside/configurations/prefix.rb
bizside-2.2.3 lib/bizside/configurations/prefix.rb
bizside-2.2.2 lib/bizside/configurations/prefix.rb
bizside-2.2.1 lib/bizside/configurations/prefix.rb
bizside-2.2.0 lib/bizside/configurations/prefix.rb
bizside-2.1.12 lib/bizside/configurations/prefix.rb
bizside-2.1.11 lib/bizside/configurations/prefix.rb