module Patriarch::Behaviours::ClassMethods

Gathers class methods that should be available for model that include Patriarch::Behaviours

Public Instance Methods

check_add_behaviour_syntax(options) click to toggle source

Helper that checks if options syntax is correct Raises errors if not with indications on what should be corrected @param [Object] options

# File lib/patriarch/behaviours.rb, line 277
def check_add_behaviour_syntax(options)
  if options[:medium_between] || options[:via]
    check_tripartite_add_behaviour_syntax(options)
  elsif options[:on] || options[:by]
    check_bipartite_add_behaviour_syntax(options)
  end
end