Sha256: 548a5105c87d7b935a808603a109f4b5b55d82455da28ba723ff8c2c56460607

Contents?: true

Size: 652 Bytes

Versions: 47

Compression:

Stored size: 652 Bytes

Contents

module SplitIoClient

  #
  # acts as dto for a partition structure
  #
  class Partition < NoMethodError

    #
    # definition of the condition
    #
    # @returns [object] condition values
    attr_accessor :data

    def initialize(partition)
      @data = partition
    end

    #
    # @return [object] the treatment value for this partition
    def treatment
      @data[:treatment]
    end

    #
    # @return [object] the size value for this partition
    def size
      @data[:size]
    end

    #
    # @return [boolean] true if the partition is empty false otherwise
    def is_empty?
      @data.empty? ? true : false
    end
  end

end

Version data entries

47 entries across 47 versions & 1 rubygems

Version Path
splitclient-rb-3.2.4 lib/engine/parser/partition.rb
splitclient-rb-3.2.4.pre.rc5 lib/engine/parser/partition.rb
splitclient-rb-3.2.4.pre.rc4 lib/engine/parser/partition.rb
splitclient-rb-3.2.4.pre.rc3 lib/engine/parser/partition.rb
splitclient-rb-3.2.4.pre.rc2 lib/engine/parser/partition.rb
splitclient-rb-3.2.4.pre.rc1 lib/engine/parser/partition.rb
splitclient-rb-3.2.3 lib/engine/parser/partition.rb
splitclient-rb-3.2.3.pre.rc1 lib/engine/parser/partition.rb
splitclient-rb-3.2.2 lib/engine/parser/partition.rb
splitclient-rb-3.2.1 lib/engine/parser/partition.rb
splitclient-rb-3.2.0 lib/engine/parser/partition.rb
splitclient-rb-3.1.3 lib/engine/parser/partition.rb
splitclient-rb-3.1.3.pre.rc3 lib/engine/parser/partition.rb
splitclient-rb-3.1.3.pre.rc2 lib/engine/parser/partition.rb
splitclient-rb-3.1.3.pre.rc1 lib/engine/parser/partition.rb
splitclient-rb-3.1.2 lib/engine/parser/partition.rb
splitclient-rb-3.1.1 lib/engine/parser/partition.rb
splitclient-rb-3.1.0 lib/engine/parser/partition.rb
splitclient-rb-3.1.0.pre.rc12 lib/engine/parser/partition.rb
splitclient-rb-3.1.0.pre.rc11 lib/engine/parser/partition.rb