Class: ActiveRecord::Reflection::EmbedsOneReflection
- Inherits:
-
AssociationReflection
- Object
- AssociationReflection
- ActiveRecord::Reflection::EmbedsOneReflection
- Defined in:
- lib/active_record/embeds_reflection.rb
Overview
:nodoc:
Instance Method Summary collapse
- #association_class_with_embeds_one ⇒ Object
- #embeds_one? ⇒ Boolean
-
#initialize(name, scope, options, active_record) ⇒ EmbedsOneReflection
constructor
A new instance of EmbedsOneReflection.
- #macro ⇒ Object
Constructor Details
#initialize(name, scope, options, active_record) ⇒ EmbedsOneReflection
Returns a new instance of EmbedsOneReflection.
8 9 10 |
# File 'lib/active_record/embeds_reflection.rb', line 8 def initialize(name, scope, , active_record) super(macro, name, scope, , active_record) end |
Instance Method Details
#association_class_with_embeds_one ⇒ Object
16 17 18 19 20 21 22 |
# File 'lib/active_record/embeds_reflection.rb', line 16 def if macro == :embeds_one Associations::EmbedsOneAssociation else end end |
#embeds_one? ⇒ Boolean
14 |
# File 'lib/active_record/embeds_reflection.rb', line 14 def ; true; end |
#macro ⇒ Object
12 |
# File 'lib/active_record/embeds_reflection.rb', line 12 def macro; :embeds_one; end |