Class: Yema::Virtus::Builder::Inclusion

Inherits:
Yema::Virtus::Builder show all
Defined in:
lib/yema/virtus/builder/inclusion.rb

Instance Attribute Summary

Attributes inherited from Yema::Virtus::Builder

#attribute

Instance Method Summary collapse

Methods inherited from Yema::Virtus::Builder

#initialize, #options

Constructor Details

This class inherits a constructor from Yema::Virtus::Builder

Instance Method Details

#buildObject



6
7
8
9
# File 'lib/yema/virtus/builder/inclusion.rb', line 6

def build
  within = options.fetch(:within, false)
  Rule::Inclusion.new(attribute.name, within: within) if within
end