Class: ActiveMocker::ActiveRecord::Relationships::Relationship Private
- Inherits:
-
Object
- Object
- ActiveMocker::ActiveRecord::Relationships::Relationship
- Defined in:
- lib/active_mocker/active_record/relationships.rb
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Direct Known Subclasses
Instance Attribute Summary collapse
- #name ⇒ Object readonly private
Instance Method Summary collapse
- #class_name ⇒ Object private
- #foreign_key ⇒ Object private
-
#initialize(name, options = {}) ⇒ Relationship
constructor
private
A new instance of Relationship.
- #join_table ⇒ Object private
- #options ⇒ Object private
- #through ⇒ Object private
Constructor Details
#initialize(name, options = {}) ⇒ Relationship
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of Relationship.
35 36 37 |
# File 'lib/active_mocker/active_record/relationships.rb', line 35 def initialize(name, ={}) @name = name end |
Instance Attribute Details
#name ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
33 34 35 |
# File 'lib/active_mocker/active_record/relationships.rb', line 33 def name @name end |
Instance Method Details
#class_name ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
47 48 49 |
# File 'lib/active_mocker/active_record/relationships.rb', line 47 def class_name [:class_name] || name.to_s.camelize.singularize end |
#foreign_key ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
51 52 53 |
# File 'lib/active_mocker/active_record/relationships.rb', line 51 def foreign_key [:foreign_key] || name.to_s.foreign_key end |
#join_table ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
55 56 57 |
# File 'lib/active_mocker/active_record/relationships.rb', line 55 def join_table [:join_table] end |
#options ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
39 40 41 |
# File 'lib/active_mocker/active_record/relationships.rb', line 39 def .symbolize_keys end |
#through ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
43 44 45 |
# File 'lib/active_mocker/active_record/relationships.rb', line 43 def through [:through] end |