Class: FeatureHub::Sdk::ClientEvalFeatureContext
- Inherits:
-
ClientContext
- Object
- ClientContext
- FeatureHub::Sdk::ClientEvalFeatureContext
- Defined in:
- lib/feature_hub/sdk/context.rb
Overview
represents the strategies being evaluated locally
Instance Attribute Summary
Attributes inherited from ClientContext
Instance Method Summary collapse
- #build ⇒ Object
- #build_sync ⇒ Object
- #feature(key) ⇒ Object
-
#initialize(repo, edge) ⇒ ClientEvalFeatureContext
constructor
A new instance of ClientEvalFeatureContext.
Methods inherited from ClientContext
#attribute_value, #boolean, #clear, #country, #default_percentage_key, #device, #enabled?, #exists?, #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.
142 143 144 145 146 |
# File 'lib/feature_hub/sdk/context.rb', line 142 def initialize(repo, edge) super(repo) @edge = edge end |
Instance Method Details
#build ⇒ Object
148 149 150 151 |
# File 'lib/feature_hub/sdk/context.rb', line 148 def build @edge.poll self end |
#build_sync ⇒ Object
153 154 155 |
# File 'lib/feature_hub/sdk/context.rb', line 153 def build_sync self end |
#feature(key) ⇒ Object
157 158 159 |
# File 'lib/feature_hub/sdk/context.rb', line 157 def feature(key) @repo.feature(key).with_context(self) end |