Class: Yema::Virtus::Builder::StrongType
- Inherits:
-
Yema::Virtus::Builder
- Object
- Yema::Virtus::Builder
- Yema::Virtus::Builder::StrongType
- Defined in:
- lib/yema/virtus/builder/strong_type.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 10 11 12 13 14 |
# File 'lib/yema/virtus/builder/strong_type.rb', line 6 def build strict = .fetch(:strict, :high) unless strict == :none Yema::Rule::StrongType.new(attribute.name, type: attribute.class.primitive, member_type: attribute.[:member_type], strict: strict) end end |