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
.clear ⇒ Object
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_methods ⇒ Object
40
41
42
|
# File 'lib/rails_best_practices/prepares.rb', line 40
def controller_methods
@controller_methods ||= Core::Methods.new
end
|
.controllers ⇒ Object
36
37
38
|
# File 'lib/rails_best_practices/prepares.rb', line 36
def controllers
@controllers ||= Core::Controllers.new
end
|
.helper_methods ⇒ Object
48
49
50
|
# File 'lib/rails_best_practices/prepares.rb', line 48
def helper_methods
@helper_methods ||= Core::Methods.new
end
|
.helpers ⇒ Object
44
45
46
|
# File 'lib/rails_best_practices/prepares.rb', line 44
def helpers
@helpers ||= Core::Helpers.new
end
|
.klasses ⇒ Object
12
13
14
|
# File 'lib/rails_best_practices/prepares.rb', line 12
def klasses
models + mailers + controllers
end
|
.mailers ⇒ Object
32
33
34
|
# File 'lib/rails_best_practices/prepares.rb', line 32
def mailers
@mailers ||= Core::Mailers.new
end
|
.model_associations ⇒ Object
20
21
22
|
# File 'lib/rails_best_practices/prepares.rb', line 20
def model_associations
@model_associations ||= Core::ModelAssociations.new
end
|
.model_attributes ⇒ Object
24
25
26
|
# File 'lib/rails_best_practices/prepares.rb', line 24
def model_attributes
@model_attributes ||= Core::ModelAttributes.new
end
|
.model_methods ⇒ Object
28
29
30
|
# File 'lib/rails_best_practices/prepares.rb', line 28
def model_methods
@model_methods ||= Core::Methods.new
end
|
.models ⇒ Object
16
17
18
|
# File 'lib/rails_best_practices/prepares.rb', line 16
def models
@models ||= Core::Models.new
end
|
.routes ⇒ Object
52
53
54
|
# File 'lib/rails_best_practices/prepares.rb', line 52
def routes
@routes ||= Core::Routes.new
end
|