Class: PassiveRecord::Associations::Relation

Inherits:
Struct
  • Object
show all
Defined in:
lib/passive_record/associations/has_one.rb

Direct Known Subclasses

HasOneRelation

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#associationObject

Returns the value of attribute association

Returns:

  • (Object)

    the current value of association



13
14
15
# File 'lib/passive_record/associations/has_one.rb', line 13

def association
  @association
end

#parent_modelObject

Returns the value of attribute parent_model

Returns:

  • (Object)

    the current value of parent_model



13
14
15
# File 'lib/passive_record/associations/has_one.rb', line 13

def parent_model
  @parent_model
end

Instance Method Details

#singular?Boolean

Returns:

  • (Boolean)


14
15
16
# File 'lib/passive_record/associations/has_one.rb', line 14

def singular?
  true
end