Class: LaunchDarkly::Impl::Model::SegmentRule Private
- Inherits:
-
Object
- Object
- LaunchDarkly::Impl::Model::SegmentRule
- Defined in:
- lib/ldclient-rb/impl/model/segment.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Instance Attribute Summary collapse
- #bucket_by ⇒ String|nil readonly private
- #clauses ⇒ Array<LaunchDarkly::Impl::Model::Clause> readonly private
- #data ⇒ Hash readonly private
- #rollout_context_kind ⇒ String|nil readonly private
- #weight ⇒ Integer|nil readonly private
Instance Method Summary collapse
-
#initialize(data, errors_out = nil) ⇒ SegmentRule
constructor
private
A new instance of SegmentRule.
Constructor Details
#initialize(data, errors_out = nil) ⇒ SegmentRule
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of SegmentRule.
107 108 109 110 111 112 113 114 115 |
# File 'lib/ldclient-rb/impl/model/segment.rb', line 107 def initialize(data, errors_out = nil) @data = data @clauses = (data[:clauses] || []).map do |clause_data| Clause.new(clause_data, errors_out) end @weight = data[:weight] @bucket_by = data[:bucketBy] @rollout_context_kind = data[:rolloutContextKind] end |
Instance Attribute Details
#bucket_by ⇒ String|nil (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
124 125 126 |
# File 'lib/ldclient-rb/impl/model/segment.rb', line 124 def bucket_by @bucket_by end |
#clauses ⇒ Array<LaunchDarkly::Impl::Model::Clause> (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
120 121 122 |
# File 'lib/ldclient-rb/impl/model/segment.rb', line 120 def clauses @clauses end |
#data ⇒ Hash (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
118 119 120 |
# File 'lib/ldclient-rb/impl/model/segment.rb', line 118 def data @data end |
#rollout_context_kind ⇒ String|nil (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
126 127 128 |
# File 'lib/ldclient-rb/impl/model/segment.rb', line 126 def rollout_context_kind @rollout_context_kind end |
#weight ⇒ Integer|nil (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
122 123 124 |
# File 'lib/ldclient-rb/impl/model/segment.rb', line 122 def weight @weight end |