Module: Relationships

Included in:
ActiveMocker::ActiveRecord::Base
Defined in:
lib/active_mocker/active_record/relationships.rb

Instance Method Summary collapse

Instance Method Details

#relationshipsObject



5
6
7
8
9
10
# File 'lib/active_mocker/active_record/relationships.rb', line 5

def relationships
  OpenStruct.new({has_many:   @has_many   ||= [],
                  has_one:    @has_one    ||= [],
                  belongs_to: @belongs_to ||= [],
                  has_and_belongs_to_many: @has_and_belongs_to_many ||= []})
end