Class: Arspy::Operators::Interpreter::AbbreviatedAttributeInterpreter
- Inherits:
-
AttributeInterpreter
- Object
- Base
- AttributeInterpreter
- Arspy::Operators::Interpreter::AbbreviatedAttributeInterpreter
- Includes:
- Abbreviations
- Defined in:
- lib/arspy/operators/interpreter/abbreviated_attribute_interpreter.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(array, method_name) ⇒ AbbreviatedAttributeInterpreter
constructor
A new instance of AbbreviatedAttributeInterpreter.
Methods included from Abbreviations
included, #resolve_abbreviation_for_attributes_and_associations!
Methods inherited from AttributeInterpreter
Constructor Details
#initialize(array, method_name) ⇒ AbbreviatedAttributeInterpreter
Returns a new instance of AbbreviatedAttributeInterpreter.
14 15 16 17 |
# File 'lib/arspy/operators/interpreter/abbreviated_attribute_interpreter.rb', line 14 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
9 10 11 12 |
# File 'lib/arspy/operators/interpreter/abbreviated_attribute_interpreter.rb', line 9 def self.applies?(array, method_name) descriptor = resolve_abbreviation_for_attributes_and_associations!(array.first, method_name) descriptor && descriptor[:type] == :attribute end |