Class: LaunchDarkly::Impl::Model::SegmentRule
- Inherits:
-
Object
- Object
- LaunchDarkly::Impl::Model::SegmentRule
- Defined in:
- lib/ldclient-rb/impl/model/segment.rb
Overview
Instance Attribute Summary collapse
- #bucket_by ⇒ String|nil readonly
- #clauses ⇒ Array<LaunchDarkly::Impl::Model::Clause> readonly
- #data ⇒ Hash readonly
- #rollout_context_kind ⇒ String|nil readonly
- #weight ⇒ Integer|nil readonly
Instance Method Summary collapse
-
#initialize(data, errors_out = nil) ⇒ SegmentRule
constructor
A new instance of SegmentRule.
Constructor Details
#initialize(data, errors_out = nil) ⇒ SegmentRule
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)
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)
120 121 122 |
# File 'lib/ldclient-rb/impl/model/segment.rb', line 120 def clauses @clauses end |
#data ⇒ Hash (readonly)
118 119 120 |
# File 'lib/ldclient-rb/impl/model/segment.rb', line 118 def data @data end |
#rollout_context_kind ⇒ String|nil (readonly)
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)
122 123 124 |
# File 'lib/ldclient-rb/impl/model/segment.rb', line 122 def weight @weight end |