Class: ActiveData::Model::Associations::Collection::Referenced
- Defined in:
- lib/active_data/model/associations/collection/referenced.rb
Constant Summary collapse
- METHODS_EXCLUDED_FROM_DELEGATION =
%w[build create create!].map(&:to_sym).freeze
Instance Method Summary collapse
- #method_missing(method, *args, &block) ⇒ Object
- #respond_to_missing?(method, include_private = false) ⇒ Boolean
Methods inherited from Proxy
#initialize, #inspect, #to_ary
Constructor Details
This class inherits a constructor from ActiveData::Model::Associations::Collection::Proxy
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method, *args, &block) ⇒ Object
9 10 11 |
# File 'lib/active_data/model/associations/collection/referenced.rb', line 9 def method_missing(method, *args, &block) delegate_to_scope?(method) ? scope.send(method, *args, &block) : super end |
Instance Method Details
#respond_to_missing?(method, include_private = false) ⇒ Boolean
13 14 15 |
# File 'lib/active_data/model/associations/collection/referenced.rb', line 13 def respond_to_missing?(method, include_private = false) delegate_to_scope?(method) || super end |