Sha256: 1fd5e237bb49eaf5179d8e53bbaf1b8a7e5ec4e23a26947b7f929c5f832e1144

Contents?: true

Size: 499 Bytes

Versions: 10

Compression:

Stored size: 499 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

10 entries across 10 versions & 1 rubygems

Version Path
quilt_rails-1.8.0 lib/quilt_rails/configuration.rb
quilt_rails-1.7.0 lib/quilt_rails/configuration.rb
quilt_rails-1.6.0 lib/quilt_rails/configuration.rb
quilt_rails-1.5.0 lib/quilt_rails/configuration.rb
quilt_rails-1.4.1 lib/quilt_rails/configuration.rb
quilt_rails-1.4.0 lib/quilt_rails/configuration.rb
quilt_rails-1.3.3 lib/quilt_rails/configuration.rb
quilt_rails-1.3.2 lib/quilt_rails/configuration.rb
quilt_rails-1.3.1 lib/quilt_rails/configuration.rb
quilt_rails-1.2.0 lib/quilt_rails/configuration.rb