Sha256: 4a1daa6be909064d8a2eb58b868c7369b324ba7c93a52b3fd4a8133f0057538b

Contents?: true

Size: 588 Bytes

Versions: 1

Compression:

Stored size: 588 Bytes

Contents

class Dice
  class Config
    def self.sides
      @sides
    end
  
    def self.sides=(sides)
      raise ArgumentError, 'Must be a Integer' unless sides.is_a? Integer
      @sides = sides
    end  
  
    def self.dices
      @dices
    end
  
    def self.dices=(dices)
      raise ArgumentError, 'Must be a Integer' unless dices.is_a? Integer
      @dices = dices
    end
    
    def self.array?
      @array || false
    end
  
    def self.array=(array)
      raise ArgumentError, 'Must be true or false' unless [true, false].include?(array)
      @array = array
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
rdice-1.0.0 lib/dice/config.rb