File tree Expand file tree Collapse file tree 1 file changed +11
-16
lines changed Expand file tree Collapse file tree 1 file changed +11
-16
lines changed Original file line number Diff line number Diff line change 1
- # rubocop:disable Metrics/ModuleLength
2
-
3
1
$LOAD_PATH. unshift ( File . dirname ( __FILE__ ) )
4
2
require 'annotate/version'
5
3
require 'annotate/annotate_models'
@@ -72,26 +70,14 @@ def self.setup_options(options = {})
72
70
options
73
71
end
74
72
75
- def self . loaded_tasks = ( val )
76
- @loaded_tasks = val
77
- end
78
-
79
- def self . loaded_tasks
80
- @loaded_tasks
81
- end
82
-
83
73
def self . load_tasks
84
- return if loaded_tasks
85
- self . loaded_tasks = true
74
+ return if @tasks_loaded
86
75
87
76
Dir [ File . join ( File . dirname ( __FILE__ ) , 'tasks' , '**/*.rake' ) ] . each do |rake |
88
77
load rake
89
78
end
90
- end
91
79
92
- def self . load_requires ( options )
93
- options [ :require ] . count > 0 &&
94
- options [ :require ] . each { |path | require path }
80
+ @tasks_loaded = true
95
81
end
96
82
97
83
def self . eager_load ( options )
@@ -146,4 +132,13 @@ def self.bootstrap_rake
146
132
load_tasks
147
133
Rake ::Task [ :set_annotation_options ] . invoke
148
134
end
135
+
136
+ class << self
137
+ private
138
+
139
+ def load_requires ( options )
140
+ options [ :require ] . count > 0 &&
141
+ options [ :require ] . each { |path | require path }
142
+ end
143
+ end
149
144
end
You can’t perform that action at this time.
0 commit comments