Class: Arspy::Operators::Interpreter::AbbreviatedAssociationInterpreter
- Inherits:
-
AssociationInterpreter
- Object
- Base
- AssociationInterpreter
- Arspy::Operators::Interpreter::AbbreviatedAssociationInterpreter
- Includes:
- Abbreviations
- Defined in:
- lib/arspy/operators/interpreter/abbreviated_association_interpreter.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(array, method_name) ⇒ AbbreviatedAssociationInterpreter
constructor
A new instance of AbbreviatedAssociationInterpreter.
Methods included from Abbreviations
included, #resolve_abbreviation_for_attributes_and_associations!
Methods inherited from AssociationInterpreter
Constructor Details
#initialize(array, method_name) ⇒ AbbreviatedAssociationInterpreter
Returns a new instance of AbbreviatedAssociationInterpreter.
13 14 15 16 |
# File 'lib/arspy/operators/interpreter/abbreviated_association_interpreter.rb', line 13 def initialize(array, method_name) descriptor = resolve_abbreviation_for_attributes_and_associations!(array.first, method_name) super(array, descriptor[:method_name]) end |
Class Method Details
.applies?(array, method_name) ⇒ Boolean
8 9 10 11 |
# File 'lib/arspy/operators/interpreter/abbreviated_association_interpreter.rb', line 8 def self.applies?(array, method_name) descriptor = resolve_abbreviation_for_attributes_and_associations!(array.first, method_name) descriptor && descriptor[:type] == :association end |