Exception: SplitIoClient::Partition
- Inherits:
-
NoMethodError
- Object
- NoMethodError
- SplitIoClient::Partition
- Defined in:
- lib/splitclient-rb/engine/parser/partition.rb
Overview
acts as dto for a partition structure
Instance Attribute Summary collapse
-
#data ⇒ Object
definition of the condition.
Instance Method Summary collapse
-
#initialize(partition) ⇒ Partition
constructor
A new instance of Partition.
-
#is_empty? ⇒ boolean
True if the partition is empty false otherwise.
-
#size ⇒ object
The size value for this partition.
-
#treatment ⇒ object
The treatment value for this partition.
Constructor Details
#initialize(partition) ⇒ Partition
Returns a new instance of Partition.
13 14 15 |
# File 'lib/splitclient-rb/engine/parser/partition.rb', line 13 def initialize(partition) @data = partition end |
Instance Attribute Details
#data ⇒ Object
definition of the condition
11 12 13 |
# File 'lib/splitclient-rb/engine/parser/partition.rb', line 11 def data @data end |
Instance Method Details
#is_empty? ⇒ boolean
Returns true if the partition is empty false otherwise.
31 32 33 |
# File 'lib/splitclient-rb/engine/parser/partition.rb', line 31 def is_empty? @data.empty? end |
#size ⇒ object
Returns the size value for this partition.
25 26 27 |
# File 'lib/splitclient-rb/engine/parser/partition.rb', line 25 def size @data[:size] end |
#treatment ⇒ object
Returns the treatment value for this partition.
19 20 21 |
# File 'lib/splitclient-rb/engine/parser/partition.rb', line 19 def treatment @data[:treatment] end |