Exception: SplitIoClient::Partition
- Inherits:
-
NoMethodError
- Object
- NoMethodError
- SplitIoClient::Partition
- Defined in:
- lib/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.
14 15 16 |
# File 'lib/engine/parser/partition.rb', line 14 def initialize(partition) @data = partition end |
Instance Attribute Details
#data ⇒ Object
definition of the condition
12 13 14 |
# File 'lib/engine/parser/partition.rb', line 12 def data @data end |
Instance Method Details
#is_empty? ⇒ boolean
Returns true if the partition is empty false otherwise.
32 33 34 |
# File 'lib/engine/parser/partition.rb', line 32 def is_empty? @data.empty? ? true : false end |
#size ⇒ object
Returns the size value for this partition.
26 27 28 |
# File 'lib/engine/parser/partition.rb', line 26 def size @data[:size] end |
#treatment ⇒ object
Returns the treatment value for this partition.
20 21 22 |
# File 'lib/engine/parser/partition.rb', line 20 def treatment @data[:treatment] end |