Public Instance methods
before_validation()
For each composition, set the columns in the model class based on the composition object.
[show source]
# File lib/sequel/plugins/composition.rb 182 def before_validation 183 # decomposer_method is private 184 @compositions.keys.each{|n| send(model.compositions[n][:decomposer_method])} if @compositions 185 super 186 end
compositions()
Cache of composition objects for this class.
[show source]
# File lib/sequel/plugins/composition.rb 168 def compositions 169 @compositions ||= {} 170 end
freeze()
Freeze compositions hash when freezing model instance.
[show source]
# File lib/sequel/plugins/composition.rb 173 def freeze 174 compositions 175 super 176 compositions.freeze 177 self 178 end