Class: FeatureGate
- Inherits:
-
Object
- Object
- FeatureGate
- Defined in:
- lib/feature_gate.rb
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.
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
# File 'lib/feature_gate.rb', line 17 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.
13 14 15 |
# File 'lib/feature_gate.rb', line 13 def evaluation_details @evaluation_details end |
#group_name ⇒ Object
Returns the value of attribute group_name.
9 10 11 |
# File 'lib/feature_gate.rb', line 9 def group_name @group_name end |
#id_type ⇒ Object
Returns the value of attribute id_type.
11 12 13 |
# File 'lib/feature_gate.rb', line 11 def id_type @id_type end |
#name ⇒ Object
Returns the value of attribute name.
3 4 5 |
# File 'lib/feature_gate.rb', line 3 def name @name end |
#rule_id ⇒ Object
Returns the value of attribute rule_id.
7 8 9 |
# File 'lib/feature_gate.rb', line 7 def rule_id @rule_id end |
#target_app_ids ⇒ Object
Returns the value of attribute target_app_ids.
15 16 17 |
# File 'lib/feature_gate.rb', line 15 def target_app_ids @target_app_ids end |
#value ⇒ Object
Returns the value of attribute value.
5 6 7 |
# File 'lib/feature_gate.rb', line 5 def value @value end |
Class Method Details
.from_config_result(res) ⇒ Object
35 36 37 38 39 40 41 42 43 44 45 |
# File 'lib/feature_gate.rb', line 35 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 |