Sha256: 64ce288bc17b440b27aabd207d2613b1c19f4b4db540113cf6aa7f1106a6f335

Contents?: true

Size: 498 Bytes

Versions: 3

Compression:

Stored size: 498 Bytes

Contents

module Yema
  module Virtus
    class Builder
      class StrongType < self

        def build
          strict = options.fetch(:strict, :high)
          unless strict == :none
            Yema::Rule::StrongType.new(attribute.name,
                                       type: attribute.class.primitive,
                                       member_type: attribute.options[:member_type],
                                       strict: strict)
          end
        end
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
yema-0.0.3 lib/yema/virtus/builder/strong_type.rb
yema-0.0.2 lib/yema/virtus/builder/strong_type.rb
yema-0.0.1 lib/yema/virtus/builder/strong_type.rb