Sha256: 2dc6e275222f55411243435f4765e8bdb64f45e51fd8ce24cffeb9c97bd8048e

Contents?: true

Size: 578 Bytes

Versions: 2

Compression:

Stored size: 578 Bytes

Contents

module Guilded
  class Configuration

    attr_accessor :environment,
                  :jquery_google_url_template,
                  :jquery_version

    def initialize
      set_defaults
    end

    def jquery_google_url( version )
      jquery_google_url_template.gsub /\{\{version\}\}/, version
    end

    def local_jquery_name( version, min )
      "/assets/jquery-#{version}#{min ? '.min' : ''}.js"
    end

  private

    def set_defaults
      @jquery_google_url_template = "https://ajax.googleapis.com/ajax/libs/jquery/{{version}}/jquery.min.js"
    end

  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
guilded-2.0.0 lib/guilded/configuration.rb
guilded-2.0.0.pre lib/guilded/configuration.rb