Sha256: 7701eb920eecc32ad439c5e091973c9fc5edfbb7e89289ba9df172a48d94cf82

Contents?: true

Size: 697 Bytes

Versions: 13

Compression:

Stored size: 697 Bytes

Contents

module Quby
  module Compiler
    module Entities
      class AnonymousConditions < Dry::Struct
        class ConstantRule < Dry::Struct
          attribute :type, Types::String.constrained(eql: "constant")
          attribute :value, Types::Bool
        end

        class BasedOnValueRule < Dry::Struct
          attribute :type, Types::String.constrained(eql: "based_on_value")
          attribute :question_key, Types::String
          attribute :question_value, Types::String
        end

        Rule = ConstantRule | BasedOnValueRule

        attribute? :hide_pii_from_researchers, Rule.optional
        attribute? :hide_values_from_professionals, Rule.optional
      end
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
quby-compiler-0.5.9 lib/quby/compiler/entities/anonymous_conditions.rb
quby-compiler-0.5.8 lib/quby/compiler/entities/anonymous_conditions.rb
quby-compiler-0.5.7 lib/quby/compiler/entities/anonymous_conditions.rb
quby-compiler-0.5.6 lib/quby/compiler/entities/anonymous_conditions.rb
quby-compiler-0.5.5 lib/quby/compiler/entities/anonymous_conditions.rb
quby-compiler-0.5.4 lib/quby/compiler/entities/anonymous_conditions.rb
quby-compiler-0.5.3 lib/quby/compiler/entities/anonymous_conditions.rb
quby-compiler-0.5.2 lib/quby/compiler/entities/anonymous_conditions.rb
quby-compiler-0.5.1 lib/quby/compiler/entities/anonymous_conditions.rb
quby-compiler-0.5.0 lib/quby/compiler/entities/anonymous_conditions.rb
quby-compiler-0.4.16 lib/quby/compiler/entities/anonymous_conditions.rb
quby-compiler-0.4.15 lib/quby/compiler/entities/anonymous_conditions.rb
quby-compiler-0.4.14 lib/quby/compiler/entities/anonymous_conditions.rb