Class: Yema::Virtus::Builder::Required
- Inherits:
-
Yema::Virtus::Builder
- Object
- Yema::Virtus::Builder
- Yema::Virtus::Builder::Required
- Defined in:
- lib/yema/virtus/builder/required.rb
Instance Attribute Summary
Attributes inherited from Yema::Virtus::Builder
Instance Method Summary collapse
Methods inherited from Yema::Virtus::Builder
Constructor Details
This class inherits a constructor from Yema::Virtus::Builder
Instance Method Details
#build ⇒ Object
6 7 8 9 |
# File 'lib/yema/virtus/builder/required.rb', line 6 def build required = .fetch(:required, false) Rule::Required.new(attribute.name) if required end |