Sha256: c70d2186a0bdb9499ad77908230e3fec991673a33f6f200582ecab84d5a93ade

Contents?: true

Size: 595 Bytes

Versions: 10

Compression:

Stored size: 595 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])
      end

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

    end

  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
optimizely_server_side-0.0.14 lib/optimizely_server_side/optimizely_sdk.rb
optimizely_server_side-0.0.13 lib/optimizely_server_side/optimizely_sdk.rb
optimizely_server_side-0.0.12 lib/optimizely_server_side/optimizely_sdk.rb
optimizely_server_side-0.0.11 lib/optimizely_server_side/optimizely_sdk.rb
optimizely_server_side-0.0.10 lib/optimizely_server_side/optimizely_sdk.rb
optimizely_server_side-0.0.9 lib/optimizely_server_side/optimizely_sdk.rb
optimizely_server_side-0.0.8 lib/optimizely_server_side/optimizely_sdk.rb
optimizely_server_side-0.0.7 lib/optimizely_server_side/optimizely_sdk.rb
optimizely_server_side-0.0.6 lib/optimizely_server_side/optimizely_sdk.rb
optimizely_server_side-0.0.5 lib/optimizely_server_side/optimizely_sdk.rb