Class: ActiveRecordCustomPreloader::PreloadWithOptions
- Inherits:
-
Object
- Object
- ActiveRecordCustomPreloader::PreloadWithOptions
- Defined in:
- lib/active_record_custom_preloader/preload_with_options.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#options ⇒ Object
readonly
Returns the value of attribute options.
Instance Method Summary collapse
-
#initialize(name, options = {}) ⇒ PreloadWithOptions
constructor
A new instance of PreloadWithOptions.
- #loader_for(klass) ⇒ Object
Constructor Details
#initialize(name, options = {}) ⇒ PreloadWithOptions
Returns a new instance of PreloadWithOptions.
4 5 6 7 |
# File 'lib/active_record_custom_preloader/preload_with_options.rb', line 4 def initialize(name, = {}) @name = name @options = end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
3 4 5 |
# File 'lib/active_record_custom_preloader/preload_with_options.rb', line 3 def name @name end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
3 4 5 |
# File 'lib/active_record_custom_preloader/preload_with_options.rb', line 3 def @options end |
Instance Method Details
#loader_for(klass) ⇒ Object
9 10 11 |
# File 'lib/active_record_custom_preloader/preload_with_options.rb', line 9 def loader_for(klass) klass.custom_loader_for(name, ) end |