Class: FeatureHub::Sdk::ClientEvalFeatureContext

Inherits:
ClientContext show all
Defined in:
lib/feature_hub/sdk/context.rb

Overview

represents the strategies being evaluated locally

Constant Summary

Constants inherited from ClientContext

FeatureHub::Sdk::ClientContext::WELL_KNOWN_KEY_METHODS

Instance Attribute Summary

Attributes inherited from ClientContext

#repo

Instance Method Summary collapse

Methods inherited from ClientContext

#assign, #attribute_value, #boolean, #clear, #country, #default_percentage_key, #device, #enabled?, #exists?, #feature, #flag, #get_attr, #json, #number, #platform, #raw_json, #session_key, #set?, #string, #user_key, #version

Constructor Details

#initialize(repo, edge) ⇒ ClientEvalFeatureContext

Returns a new instance of ClientEvalFeatureContext.



167
168
169
170
171
# File 'lib/feature_hub/sdk/context.rb', line 167

def initialize(repo, edge)
  super(repo)

  @edge = edge
end

Instance Method Details

#buildObject



173
174
175
176
# File 'lib/feature_hub/sdk/context.rb', line 173

def build
  @edge&.poll
  self
end

#build_syncObject



178
179
180
# File 'lib/feature_hub/sdk/context.rb', line 178

def build_sync
  self
end