Sha256: 0174c9dabad19ec3c87652bb3244e186bec5e8f1fb5ced21ff66944d31227b20

Contents?: true

Size: 762 Bytes

Versions: 11

Compression:

Stored size: 762 Bytes

Contents

# frozen_string_literal: true
module OptimizelyServerSide

  class OptimizelySdk

    class << self

      # Public method to be accessed in the application
      # This is the project instance and is giving
      # access to all the optimizely sdk methods.
      # Datafile
      def project_instance(options = {})
        Optimizely::Project.new(cached_datafile,
                                options[:event_dispatcher],
                                nil,
                                nil,
                                true #skip_json_validation
                                )
      end

      def cached_datafile
        Cache.fetch('optimizely_sdk_config') do
          DatafileFetcher.datafile.content
        end
      end

    end

  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
optimizely_server_side-2.0.1 lib/optimizely_server_side/optimizely_sdk.rb
optimizely_server_side-2.0.0 lib/optimizely_server_side/optimizely_sdk.rb
optimizely_server_side-1.2.2 lib/optimizely_server_side/optimizely_sdk.rb
optimizely_server_side-1.2.1 lib/optimizely_server_side/optimizely_sdk.rb
optimizely_server_side-1.2.0 lib/optimizely_server_side/optimizely_sdk.rb
optimizely_server_side-1.0.1 lib/optimizely_server_side/optimizely_sdk.rb
optimizely_server_side-1.0.0 lib/optimizely_server_side/optimizely_sdk.rb
optimizely_server_side-0.0.18 lib/optimizely_server_side/optimizely_sdk.rb
optimizely_server_side-0.0.17 lib/optimizely_server_side/optimizely_sdk.rb
optimizely_server_side-0.0.16 lib/optimizely_server_side/optimizely_sdk.rb
optimizely_server_side-0.0.15 lib/optimizely_server_side/optimizely_sdk.rb