Class: ActiveCypher::RailsLensExt::ModelSource

Inherits:
RailsLens::ModelSource
  • Object
show all
Defined in:
lib/active_cypher/rails_lens_ext/model_source.rb

Overview

Model source for ActiveCypher graph models Provides integration with RailsLens annotation system

Class Method Summary collapse

Class Method Details

.annotate_model(model, options = {}) ⇒ Object



23
24
25
# File 'lib/active_cypher/rails_lens_ext/model_source.rb', line 23

def annotate_model(model, options = {})
  Annotator.annotate_model(model, options)
end

.file_patternsObject



19
20
21
# File 'lib/active_cypher/rails_lens_ext/model_source.rb', line 19

def file_patterns
  ['app/graph/**/*.rb', 'app/models/graph/**/*.rb', 'app/graphs/**/*.rb']
end

.models(options = {}) ⇒ Object



15
16
17
# File 'lib/active_cypher/rails_lens_ext/model_source.rb', line 15

def models(options = {})
  Annotator.send(:discover_models, options)
end

.remove_annotation(model) ⇒ Object



27
28
29
# File 'lib/active_cypher/rails_lens_ext/model_source.rb', line 27

def remove_annotation(model)
  Annotator.remove_annotation(model)
end

.source_nameObject



31
32
33
# File 'lib/active_cypher/rails_lens_ext/model_source.rb', line 31

def source_name
  'ActiveCypher Graph'
end