Class: Momocop::AssociationExtractor
- Inherits:
-
Object
- Object
- Momocop::AssociationExtractor
- Defined in:
- lib/momocop/association_extractor.rb
Constant Summary collapse
- ASSOCIATION_METHODS =
%i[has_many belongs_to has_one].freeze
Instance Method Summary collapse
Instance Method Details
#extract(source) ⇒ Object
9 10 11 12 |
# File 'lib/momocop/association_extractor.rb', line 9 def extract(source) source_string = source.is_a?(StringIO) ? source.string : source parse_content(source_string) end |