Class: FeatureGate
Instance Attribute Summary collapse
-
#evaluation_details ⇒ Object
Returns the value of attribute evaluation_details.
-
#group_name ⇒ Object
Returns the value of attribute group_name.
-
#id_type ⇒ Object
Returns the value of attribute id_type.
-
#name ⇒ Object
Returns the value of attribute name.
-
#rule_id ⇒ Object
Returns the value of attribute rule_id.
-
#target_app_ids ⇒ Object
Returns the value of attribute target_app_ids.
-
#value ⇒ Object
Returns the value of attribute value.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(name, value: false, rule_id: '', group_name: nil, id_type: '', evaluation_details: nil, target_app_ids: nil) ⇒ FeatureGate
constructor
A new instance of FeatureGate.
Constructor Details
#initialize(name, value: false, rule_id: '', group_name: nil, id_type: '', evaluation_details: nil, target_app_ids: nil) ⇒ FeatureGate
Returns a new instance of FeatureGate.
40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 |
# File 'lib/feature_gate.rb', line 40 def initialize( name, value: false, rule_id: '', group_name: nil, id_type: '', evaluation_details: nil, target_app_ids: nil ) @name = name @value = value @rule_id = rule_id @group_name = group_name @id_type = id_type @evaluation_details = evaluation_details @target_app_ids = target_app_ids end |
Instance Attribute Details
#evaluation_details ⇒ Object
Returns the value of attribute evaluation_details.
24 25 26 |
# File 'lib/feature_gate.rb', line 24 def evaluation_details @evaluation_details end |
#group_name ⇒ Object
Returns the value of attribute group_name.
18 19 20 |
# File 'lib/feature_gate.rb', line 18 def group_name @group_name end |
#id_type ⇒ Object
Returns the value of attribute id_type.
21 22 23 |
# File 'lib/feature_gate.rb', line 21 def id_type @id_type end |
#name ⇒ Object
Returns the value of attribute name.
9 10 11 |
# File 'lib/feature_gate.rb', line 9 def name @name end |
#rule_id ⇒ Object
Returns the value of attribute rule_id.
15 16 17 |
# File 'lib/feature_gate.rb', line 15 def rule_id @rule_id end |
#target_app_ids ⇒ Object
Returns the value of attribute target_app_ids.
27 28 29 |
# File 'lib/feature_gate.rb', line 27 def target_app_ids @target_app_ids end |
#value ⇒ Object
Returns the value of attribute value.
12 13 14 |
# File 'lib/feature_gate.rb', line 12 def value @value end |
Class Method Details
.from_config_result(res) ⇒ Object
59 60 61 62 63 64 65 66 67 68 69 |
# File 'lib/feature_gate.rb', line 59 def self.from_config_result(res) new( res.name, value: res.gate_value, rule_id: res.rule_id, group_name: res.group_name, id_type: res.id_type, evaluation_details: res.evaluation_details, target_app_ids: res.target_app_ids ) end |