Class: RailsLens::Providers::ViewNotesProvider

Inherits:
Base
  • Object
show all
Defined in:
lib/rails_lens/providers/view_notes_provider.rb

Overview

View-specific notes provider that wraps the Notes analyzer for views only

Instance Method Summary collapse

Instance Method Details

#applicable?(model_class) ⇒ Boolean

Returns:

  • (Boolean)


11
12
13
14
# File 'lib/rails_lens/providers/view_notes_provider.rb', line 11

def applicable?(model_class)
  # Only applicable to views
  model_has_table?(model_class) && ModelDetector.view_exists?(model_class)
end

#process(model_class, connection = nil) ⇒ Object



16
17
18
19
# File 'lib/rails_lens/providers/view_notes_provider.rb', line 16

def process(model_class, connection = nil)
  analyzer = Analyzers::Notes.new(model_class)
  analyzer.analyze
end

#typeObject



7
8
9
# File 'lib/rails_lens/providers/view_notes_provider.rb', line 7

def type
  :notes
end