Class: Guise::GuiseForBuilder Private
- Inherits:
-
Object
- Object
- Guise::GuiseForBuilder
- Defined in:
- lib/guise/builders.rb
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Instance Method Summary collapse
- #build! ⇒ Object private
-
#initialize(association_class, options, association_options) ⇒ GuiseForBuilder
constructor
private
A new instance of GuiseForBuilder.
Constructor Details
#initialize(association_class, options, association_options) ⇒ GuiseForBuilder
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of GuiseForBuilder.
80 81 82 83 84 85 86 87 88 89 90 91 92 93 |
# File 'lib/guise/builders.rb', line 80 def initialize(association_class, , ) @association_class = association_class @options = # if `:validate` is specified, coerce the value into a boolean, otherwise, default to # `true` @define_validations = if .key?(:validate) !!.delete(:validate) else true end @association_options = @options..merge() end |
Instance Method Details
#build! ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
95 96 97 98 99 100 101 102 103 |
# File 'lib/guise/builders.rb', line 95 def build! define_association! define_scopes! if define_validations? define_validations! end end |