Module: RailsBestPractices::Prepares

Defined in:
lib/rails_best_practices/prepares.rb,
lib/rails_best_practices/prepares/model_prepare.rb,
lib/rails_best_practices/prepares/route_prepare.rb,
lib/rails_best_practices/prepares/helper_prepare.rb,
lib/rails_best_practices/prepares/mailer_prepare.rb,
lib/rails_best_practices/prepares/schema_prepare.rb,
lib/rails_best_practices/prepares/controller_prepare.rb

Defined Under Namespace

Classes: ControllerPrepare, HelperPrepare, MailerPrepare, ModelPrepare, RoutePrepare, SchemaPrepare

Class Method Summary collapse

Class Method Details

.clearObject

Clear all prepare objects.



57
58
59
60
61
# File 'lib/rails_best_practices/prepares.rb', line 57

def clear
  instance_variables.each do |instance_variable|
    instance_variable_set(instance_variable, nil)
  end
end

.controller_methodsObject



40
41
42
# File 'lib/rails_best_practices/prepares.rb', line 40

def controller_methods
  @controller_methods ||= Core::Methods.new
end

.controllersObject



36
37
38
# File 'lib/rails_best_practices/prepares.rb', line 36

def controllers
  @controllers ||= Core::Controllers.new
end

.helper_methodsObject



48
49
50
# File 'lib/rails_best_practices/prepares.rb', line 48

def helper_methods
  @helper_methods ||= Core::Methods.new
end

.helpersObject



44
45
46
# File 'lib/rails_best_practices/prepares.rb', line 44

def helpers
  @helpers ||= Core::Helpers.new
end

.klassesObject



12
13
14
# File 'lib/rails_best_practices/prepares.rb', line 12

def klasses
  models + mailers + controllers
end

.mailersObject



32
33
34
# File 'lib/rails_best_practices/prepares.rb', line 32

def mailers
  @mailers ||= Core::Mailers.new
end

.model_associationsObject



20
21
22
# File 'lib/rails_best_practices/prepares.rb', line 20

def model_associations
  @model_associations ||= Core::ModelAssociations.new
end

.model_attributesObject



24
25
26
# File 'lib/rails_best_practices/prepares.rb', line 24

def model_attributes
  @model_attributes ||= Core::ModelAttributes.new
end

.model_methodsObject



28
29
30
# File 'lib/rails_best_practices/prepares.rb', line 28

def model_methods
  @model_methods ||= Core::Methods.new
end

.modelsObject



16
17
18
# File 'lib/rails_best_practices/prepares.rb', line 16

def models
  @models ||= Core::Models.new
end

.routesObject



52
53
54
# File 'lib/rails_best_practices/prepares.rb', line 52

def routes
  @routes ||= Core::Routes.new
end