Class: DuckRecord::Reflection::HasOneReflection

Inherits:
AssociationReflection show all
Defined in:
lib/duck_record/reflection.rb

Overview

:nodoc:

Instance Attribute Summary

Attributes inherited from AssociationReflection

#parent_reflection

Attributes inherited from MacroReflection

#active_record, #name, #options, #plural_name

Instance Method Summary collapse

Methods inherited from AssociationReflection

#add_as_source, #collection?, #compute_class, #constructable?, #initialize, #klass, #nested?, #source_reflection, #validate?

Methods inherited from MacroReflection

#compute_class, #initialize, #klass

Methods inherited from AbstractReflection

#alias_candidate, #build_association, #check_validity!, #class_name

Constructor Details

This class inherits a constructor from DuckRecord::Reflection::AssociationReflection

Instance Method Details

#association_classObject



304
305
306
# File 'lib/duck_record/reflection.rb', line 304

def association_class
  Associations::HasOneAssociation
end

#has_one?Boolean



302
# File 'lib/duck_record/reflection.rb', line 302

def has_one?; true; end

#macroObject



300
# File 'lib/duck_record/reflection.rb', line 300

def macro; :has_one; end