Sha256: 5aa0abfcee97c800ec888ca20dbcd1027236dc07f9999b5e3d6a72dfd2a81db3

Contents?: true

Size: 380 Bytes

Versions: 3

Compression:

Stored size: 380 Bytes

Contents

module Catlogic
  class Distribution
    attr_reader :label

    def initialize(distribution)
      @label = distribution
    end

    def opposite
      if self.label == 'distributed'
        opposite = Distribution.new('undistributed')
      elsif self.label == 'undistributed'
        opposite = Distribution.new('distributed')
      end
      return opposite
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
catlogic-1.1.0 lib/catlogic/distribution.rb
catlogic-1.0.0 lib/catlogic/distribution.rb
catlogic-0.0.3 lib/catlogic/distribution.rb