Class: Counter::Cache::Counters::BufferCounter::RelationFinder
- Inherits:
-
Struct
- Object
- Struct
- Counter::Cache::Counters::BufferCounter::RelationFinder
- Defined in:
- lib/counter/cache/counters/buffer_counter/relation_finder.rb
Instance Attribute Summary collapse
-
#options ⇒ Object
Returns the value of attribute options.
-
#source_object ⇒ Object
Returns the value of attribute source_object.
Instance Method Summary collapse
Instance Attribute Details
#options ⇒ Object
Returns the value of attribute options
5 6 7 |
# File 'lib/counter/cache/counters/buffer_counter/relation_finder.rb', line 5 def @options end |
#source_object ⇒ Object
Returns the value of attribute source_object
5 6 7 |
# File 'lib/counter/cache/counters/buffer_counter/relation_finder.rb', line 5 def source_object @source_object end |
Instance Method Details
#relation_class ⇒ Object
6 7 8 9 10 |
# File 'lib/counter/cache/counters/buffer_counter/relation_finder.rb', line 6 def relation_class return .relation_class_name if .relation_class_name return polymorphic_type if .polymorphic? reflection_type end |
#relation_id ⇒ Object
12 13 14 |
# File 'lib/counter/cache/counters/buffer_counter/relation_finder.rb', line 12 def relation_id .relation_id || source_object.send("#{.relation}_id") end |