Sha256: 31f46433acd04eb88e8eef0853e1bd816521800db14bed4d330603e1e7164d5d

Contents?: true

Size: 243 Bytes

Versions: 3

Compression:

Stored size: 243 Bytes

Contents

module Yema
  module Virtus
    class Builder
      class Required < self

        def build
          required = options.fetch(:required, false)
          Rule::Required.new(attribute.name) if required
        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/required.rb
yema-0.0.2 lib/yema/virtus/builder/required.rb
yema-0.0.1 lib/yema/virtus/builder/required.rb