Class: Hackle::TargetingType
- Inherits:
-
Object
- Object
- Hackle::TargetingType
- Defined in:
- lib/hackle/internal/model/targeting.rb
Constant Summary collapse
- IDENTIFIER =
new( [ TargetKeyType::SEGMENT ] )
- PROPERTY =
new( [ TargetKeyType::SEGMENT, TargetKeyType::USER_PROPERTY, TargetKeyType::HACKLE_PROPERTY, TargetKeyType::AB_TEST, TargetKeyType::FEATURE_FLAG ] )
- SEGMENT =
new( [ TargetKeyType::USER_ID, TargetKeyType::USER_PROPERTY, TargetKeyType::HACKLE_PROPERTY ] )
Instance Attribute Summary collapse
-
#supported_key_types ⇒ Object
readonly
Returns the value of attribute supported_key_types.
Instance Method Summary collapse
-
#initialize(supported_key_types) ⇒ TargetingType
constructor
A new instance of TargetingType.
- #supports?(key_type) ⇒ Boolean
Constructor Details
#initialize(supported_key_types) ⇒ TargetingType
Returns a new instance of TargetingType.
13 14 15 16 |
# File 'lib/hackle/internal/model/targeting.rb', line 13 def initialize(supported_key_types) # @type [Array<TargetKeyType>] @supported_key_types = supported_key_types end |
Instance Attribute Details
#supported_key_types ⇒ Object (readonly)
Returns the value of attribute supported_key_types.
10 11 12 |
# File 'lib/hackle/internal/model/targeting.rb', line 10 def supported_key_types @supported_key_types end |
Instance Method Details
#supports?(key_type) ⇒ Boolean
19 20 21 |
# File 'lib/hackle/internal/model/targeting.rb', line 19 def supports?(key_type) @supported_key_types.include?(key_type) end |