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.
141 142 143 144 145 146 147 148 149 |
# File 'lib/ldclient-rb/impl/model/segment.rb', line 141 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.
158 159 160 |
# File 'lib/ldclient-rb/impl/model/segment.rb', line 158 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.
154 155 156 |
# File 'lib/ldclient-rb/impl/model/segment.rb', line 154 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.
152 153 154 |
# File 'lib/ldclient-rb/impl/model/segment.rb', line 152 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.
160 161 162 |
# File 'lib/ldclient-rb/impl/model/segment.rb', line 160 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.
156 157 158 |
# File 'lib/ldclient-rb/impl/model/segment.rb', line 156 def weight @weight end |