Class: EagerEye::AssociationParser
- Inherits:
-
Object
- Object
- EagerEye::AssociationParser
- Defined in:
- lib/eager_eye/association_parser.rb
Constant Summary collapse
- ASSOCIATION_METHODS =
%i[has_many has_one belongs_to has_and_belongs_to_many].freeze
Instance Attribute Summary collapse
-
#preloaded_associations ⇒ Object
readonly
Returns the value of attribute preloaded_associations.
Instance Method Summary collapse
-
#initialize ⇒ AssociationParser
constructor
A new instance of AssociationParser.
- #parse_model(ast, model_name) ⇒ Object
Constructor Details
#initialize ⇒ AssociationParser
Returns a new instance of AssociationParser.
9 10 11 |
# File 'lib/eager_eye/association_parser.rb', line 9 def initialize @preloaded_associations = {} end |
Instance Attribute Details
#preloaded_associations ⇒ Object (readonly)
Returns the value of attribute preloaded_associations.
7 8 9 |
# File 'lib/eager_eye/association_parser.rb', line 7 def preloaded_associations @preloaded_associations end |
Instance Method Details
#parse_model(ast, model_name) ⇒ Object
13 14 15 16 17 |
# File 'lib/eager_eye/association_parser.rb', line 13 def parse_model(ast, model_name) return unless ast traverse(ast, model_name) end |