module Shiftable::ModSignature::CxMethods

Public Instance Methods

has_rel() click to toggle source
# File lib/shiftable/mod_signature.rb, line 74
def has_rel
  associations[:has_many]
end
shift_data!(shift_to:, shift_from:, bang: false) click to toggle source
# File lib/shiftable/mod_signature.rb, line 78
def shift_data!(shift_to:, shift_from:, bang: false)
  validate_relationships
  shifting_rel = ShiftingRelation.new(
    to: shift_to,
    from: shift_from,
    column: shift_column,
    base: base,
    wrapper: wrapper,
    bang: bang
  )
  shifting_rel.shift do
    before_shift&.call(shifting_rel)
  end
end