Sha256: 050b969e90ade41285717254139178521b64ecfd30401399742f87a0894d457a

Contents?: true

Size: 333 Bytes

Versions: 2

Compression:

Stored size: 333 Bytes

Contents

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

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
catlogic-0.0.2 lib/catlogic/distribution.rb
catlogic-0.0.1 lib/catlogic/distribution.rb