Sha256: 895293a2a38489ba72dab77f2329ca8617173c2f9d610e39e0206ae20711ecaf

Contents?: true

Size: 500 Bytes

Versions: 15

Compression:

Stored size: 500 Bytes

Contents

# frozen_string_literal: true

module Quilt
  class Configuration
    attr_accessor :react_server_host, :react_server_protocol

    def initialize
      ip = ENV['REACT_SERVER_IP'] || 'localhost'
      port = ENV['REACT_SERVER_PORT'] || 8081

      @react_server_host = "#{ip}:#{port}"
      @react_server_protocol = ENV['REACT_SERVER_PROTOCOL'] || 'http'
    end
  end

  def self.configuration
    @configuration ||= Configuration.new
  end

  def self.configure
    yield(configuration)
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
quilt_rails-3.3.0 lib/quilt_rails/configuration.rb
quilt_rails-3.2.1 lib/quilt_rails/configuration.rb
quilt_rails-3.1.1 lib/quilt_rails/configuration.rb
quilt_rails-3.1.0 lib/quilt_rails/configuration.rb
quilt_rails-3.0.0 lib/quilt_rails/configuration.rb
quilt_rails-2.0.0 lib/quilt_rails/configuration.rb
quilt_rails-1.13.0 lib/quilt_rails/configuration.rb
quilt_rails-1.12.2 lib/quilt_rails/configuration.rb
quilt_rails-1.12.1 lib/quilt_rails/configuration.rb
quilt_rails-1.12.0 lib/quilt_rails/configuration.rb
quilt_rails-1.11.1 lib/quilt_rails/configuration.rb
quilt_rails-1.10.0 lib/quilt_rails/configuration.rb
quilt_rails-1.9.2 lib/quilt_rails/configuration.rb
quilt_rails-1.9.1 lib/quilt_rails/configuration.rb
quilt_rails-1.9.0 lib/quilt_rails/configuration.rb