Class: LintFu::Plugins::Rails::ModelApplication

Inherits:
Object
  • Object
show all
Includes:
EidosContainer
Defined in:
lib/lint_fu/plugins/rails/model_application.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from EidosContainer

#add_eidos, #each_eidos, #eide, #remove_eidos

Constructor Details

#initialize(fs_root) ⇒ ModelApplication

Returns a new instance of ModelApplication.



8
9
10
# File 'lib/lint_fu/plugins/rails/model_application.rb', line 8

def initialize(fs_root)
  @fs_root = fs_root
end

Instance Attribute Details

#fs_rootObject (readonly)

Returns the value of attribute fs_root.



4
5
6
# File 'lib/lint_fu/plugins/rails/model_application.rb', line 4

def fs_root
  @fs_root
end

Instance Method Details

#controllersObject



12
13
14
# File 'lib/lint_fu/plugins/rails/model_application.rb', line 12

def controllers
  eide.select { |m| m.kind_of?(LintFu::Plugins::ActionPack::ControllerEidos) }
end

#modelsObject



16
17
18
# File 'lib/lint_fu/plugins/rails/model_application.rb', line 16

def models
  eide.select { |m| m.kind_of?(LintFu::Plugins::ActiveRecord::ModelEidos) }
end