class MR::FakeRecord::Association

Attributes

owner[R]

ActiveRecord method

reflection[R]

ActiveRecord method

Public Class Methods

new(owner, reflection) click to toggle source
# File lib/mr/fake_record/associations.rb, line 183
def initialize(owner, reflection)
  @owner = owner
  @reflection = reflection
  @ivar_name = "@#{@reflection.name}"
end

Public Instance Methods

<=>(other) click to toggle source
Calls superclass method
# File lib/mr/fake_record/associations.rb, line 197
def <=>(other)
  other.kind_of?(Association) ? self.reflection <=> other.reflection : super
end
klass() click to toggle source

ActiveRecord method

# File lib/mr/fake_record/associations.rb, line 193
def klass
  self.reflection.klass
end
read() click to toggle source
# File lib/mr/fake_record/associations.rb, line 189
def read;         raise NotImplementedError; end
write(value) click to toggle source
# File lib/mr/fake_record/associations.rb, line 190
def write(value); raise NotImplementedError; end