public
Fork of wycats/merb-core
Description: Merb Core: All you need. None you don't.
Homepage: http://www.merbivore.com
Clone URL: git://github.com/simonjefford/merb-core.git
Search Repo:
Merge commit 'wycats/master'
simonjefford (author)
Fri May 02 11:56:44 -0700 2008
commit  d962e268d77c4e93c0026c1a6a5ebace7a574c1b
tree    bbf6ffe60992c71b58500e5c7bc2a51514a388f5
parent  a8c50996112a2da48a6d6372156788a90ba42350 parent  f7d2a4865d4123785bcabed2263e1dbb7ef14b17
...
1
2
3
 
 
 
 
4
5
6
7
 
8
...
1
2
3
4
5
6
7
8
9
10
 
11
12
0
@@ -1,9 +1,13 @@
0
 #!/usr/bin/env ruby
0
 require "merb-core"
0
 
0
+if ARGV[0] && ARGV[0] =~ /^[^-]/
0
+ ARGV.push "-H"
0
+end
0
+
0
 unless %w[-a --adapter -i --irb-console -r --script-runner].any? { |o| ARGV.index(o) }
0
   ARGV.push *%w[-a mongrel]
0
 end
0
-
0
+
0
 Merb.start
...
14
15
16
 
17
18
19
20
...
26
27
28
29
 
 
 
 
 
 
 
 
30
31
 
32
33
34
...
40
41
42
43
 
44
45
46
47
48
49
...
52
53
54
55
 
56
57
 
58
59
60
61
62
 
63
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
64
65
66
...
72
73
74
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
75
76
77
...
134
135
136
137
 
138
139
140
141
142
143
...
143
144
145
146
 
147
148
 
 
 
 
 
 
 
 
149
150
151
152
153
 
154
155
156
 
157
158
159
...
183
184
185
 
 
 
 
186
187
188
189
190
191
192
...
195
196
197
 
 
 
 
 
 
 
198
199
200
201
202
 
203
204
205
206
 
207
208
209
210
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
211
212
213
214
215
 
216
217
218
219
220
...
223
224
225
226
227
 
 
 
228
229
230
231
 
232
233
 
 
234
235
236
...
238
239
240
241
 
242
243
244
...
255
256
257
 
 
 
 
258
259
260
261
...
266
267
268
269
 
270
271
272
273
274
275
 
276
277
278
279
280
281
282
283
284
...
280
281
282
283
 
284
285
286
287
288
289
 
290
291
292
293
294
295
 
296
297
298
299
300
301
 
302
303
 
 
 
 
 
304
305
306
307
308
309
 
 
 
 
310
311
312
313
314
315
316
317
 
 
 
 
318
319
320
...
14
15
16
17
18
19
20
21
...
27
28
29
 
30
31
32
33
34
35
36
37
38
 
39
40
41
42
...
48
49
50
 
51
52
53
54
55
56
57
...
60
61
62
 
63
64
 
65
66
67
68
69
 
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
...
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
...
177
178
179
 
180
181
182
183
184
185
186
...
186
187
188
 
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
 
204
205
206
 
207
208
209
210
...
234
235
236
237
238
239
240
241
242
243
244
245
246
247
...
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
 
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
 
329
330
331
332
333
334
...
337
338
339
 
 
340
341
342
343
344
345
 
346
347
 
348
349
350
351
352
...
354
355
356
 
357
358
359
360
...
371
372
373
374
375
376
377
378
379
380
381
...
386
387
388
 
389
390
391
392
393
394
 
395
396
397
398
399
400
401
402
403
404
...
400
401
402
 
403
404
405
406
407
408
 
409
410
411
412
413
414
 
415
416
417
418
419
420
 
421
422
 
423
424
425
426
427
428
429
430
431
432
 
433
434
435
436
437
438
439
440
 
 
 
 
441
442
443
444
445
446
447
0
@@ -14,6 +14,7 @@
0
   class << self
0
 
0
     # Startup Merb by setting up the Config and starting the server.
0
+ # This is where Merb application environment and root path are set.
0
     #
0
     # ==== Parameters
0
     # argv<String, Hash>::
0
0
@@ -26,9 +27,16 @@
0
       end
0
       Merb.environment = Merb::Config[:environment]
0
       Merb.root = Merb::Config[:merb_root]
0
- Merb::Server.start(Merb::Config[:port], Merb::Config[:cluster])
0
+ case Merb::Config[:action]
0
+ when :kill
0
+ Merb::Server.kill(Merb::Config[:port], 1)
0
+ when :kill_9
0
+ Merb::Server.kill(Merb::Config[:port], 9)
0
+ else
0
+ Merb::Server.start(Merb::Config[:port], Merb::Config[:cluster])
0
+ end
0
     end
0
-
0
+
0
     # Start the Merb environment, but only if it hasn't been loaded yet.
0
     #
0
     # ==== Parameters
0
@@ -40,7 +48,7 @@
0
         @started = true
0
       end
0
     end
0
-
0
+
0
     # Restart the Merb environment explicitly.
0
     #
0
     # ==== Parameters
0
0
0
0
@@ -52,15 +60,33 @@
0
     end
0
 
0
     attr_accessor :environment, :load_paths, :adapter
0
-
0
+
0
     alias :env :environment
0
-
0
+
0
     Merb.load_paths = Hash.new { [Merb.root] } unless Merb.load_paths.is_a?(Hash)
0
 
0
     # This is the core mechanism for setting up your application layout
0
     # merb-core won't set a default application layout, but merb-more will
0
- # use the app/:type layout that is in use in Merb 0.5.
0
+ # use the app/:type layout:
0
     #
0
+ # app/models for models
0
+ # app/mailers for mailers (special type of controllers)
0
+ # app/parts for parts, Merb components
0
+ # app/views for templates
0
+ # app/controllers for controller
0
+ #
0
+ # ==== Examples
0
+ #
0
+ # This method gives you a way to build up your own application
0
+ # structure, for instance, to reflect the structure Rails
0
+ # uses to simplify transition of legacy application, you can
0
+ # set it up like this:
0
+ #
0
+ # Merb.push_path(:models, Merb.root / "app" / "models", "**/*.rb")
0
+ # Merb.push_path(:mailers, Merb.root / "app" / "models", "**/*.rb")
0
+ # Merb.push_path(:controllers, Merb.root / "app" / "controllers", "**/*.rb")
0
+ # Merb.push_path(:views, Merb.root / "app" / "views", "**/*.rb")
0
+ #
0
     # ==== Parameters
0
     # type<Symbol>:: The type of path being registered (i.e. :view)
0
     # path<String>:: The full path
0
@@ -72,6 +98,23 @@
0
       load_paths[type] = [path, file_glob]
0
     end
0
 
0
+ # Removes given types of application components
0
+ # from load path Merb uses for autoloading.
0
+ #
0
+ # ==== Parameters
0
+ # *args<Array(Symbol)>::
0
+ # components names, for instance, :views, :models
0
+ #
0
+ # ==== Examples
0
+ # Using this combined with Merb::GlobalHelpers.push_path
0
+ # you can make your Merb application use legacy Rails
0
+ # application components.
0
+ #
0
+ # Merb.root = "path/to/legacy/app/root"
0
+ # Merb.remove_paths(:mailers)
0
+ # Merb.push_path(:mailers, Merb.root / "app" / "models", "**/*.rb")
0
+ #
0
+ # Will make Merb use app/models for mailers just like Ruby on Rails does.
0
     def remove_paths(*args)
0
       args.each {|arg| load_paths.delete(arg)}
0
     end
0
@@ -134,7 +177,7 @@
0
     end
0
 
0
     # ==== Returns
0
- # String:: The directory that contains the log file.
0
+ # String:: Path to directory that contains the log file.
0
     def log_path
0
       case Merb::Config[:log_file]
0
       when String then File.dirname(Merb::Config[:log_file])
0
0
0
0
@@ -143,17 +186,25 @@
0
     end
0
 
0
     # ==== Returns
0
- # String:: The root directory of the Merb framework.
0
+ # String:: The path of root directory of the Merb framework.
0
     def framework_root() @framework_root ||= File.dirname(__FILE__) end
0
 
0
+ # ==== Returns
0
+ # RegExp::
0
+ # Regular expression against which deferred actions
0
+ # are matched by Rack application handler.
0
+ #
0
+ # ==== Notes
0
+ # Concatenates :deferred_actions configuration option
0
+ # values.
0
     def deferred_actions
0
       @deferred ||= begin
0
         if Merb::Config[:deferred_actions].empty?
0
           /^\0$/
0
- else
0
+ else
0
           /#{Merb::Config[:deferred_actions].join("|")}/
0
         end
0
- end
0
+ end
0
     end
0
 
0
     # Allows flat apps by setting no default framework directories and yielding
0
@@ -183,6 +234,10 @@
0
     # name<~to_s>:: Name of the session type to register.
0
     # file<String>:: The file that defines this session type.
0
     # description<String>:: An optional description of the session type.
0
+ #
0
+ # ==== Notes
0
+ # Merb currently supports memory, cookie and memcache session
0
+ # types.
0
     def register_session_type(name, file, description = nil)
0
       @registered_session_types ||= Dictionary.new
0
       @registered_session_types[name] = {
0
0
0
0
0
@@ -195,24 +250,83 @@
0
 
0
     # ==== Returns
0
     # Boolean:: True if Merb is running via script/frozen-merb or other freezer.
0
+ #
0
+ # ==== Notes
0
+ # Freezing means bundling framework libraries with your application
0
+ # making it independent from environment it runs in. This is a good
0
+ # practice to freeze application framework and gems it uses and
0
+ # very useful when application is run in some sort of sandbox,
0
+ # for instance, shared hosting with preconfigured gems.
0
     def frozen?
0
       @frozen
0
     end
0
 
0
     # Used by script/frozen-merb and other freezers to mark Merb as frozen.
0
+ # See Merb::GlobalHelpers.frozen? for more details on framework freezing.
0
     def frozen!
0
       @frozen = true
0
     end
0
-
0
+
0
     # Load configuration and assign logger.
0
     #
0
     # ==== Parameters
0
     # options<Hash>:: Options to pass on to the Merb config.
0
+ #
0
+ # ==== Options
0
+ # :host<String>:: host to bind to,
0
+ # default is 0.0.0.0.
0
+ #
0
+ # :port<Fixnum>:: port to run Merb application on,
0
+ # default is 4000.
0
+ #
0
+ # :adapter<String>:: name of Rack adapter to use,
0
+ # default is "runner"
0
+ #
0
+ # :reload_classes<Boolean>:: whether Merb should reload
0
+ # classes on each request,
0
+ # default is true
0
+ #
0
+ # :environment<String>:: name of environment to use,
0
+ # default is development
0
+ #
0
+ # :merb_root<String>:: Merb application root,
0
+ # default is Dir.pwd
0
+ #
0
+ # :use_mutex<Boolean>:: turns action dispatch synchronization
0
+ # on or off, default is on (true)
0
+ #
0
+ # :session_id_key<String>:: session identifier,
0
+ # default is _session_id
0
+ #
0
+ # :log_delimiter<String>:: what Merb logger uses as delimiter
0
+ # between message sections, default is " ~ "
0
+ #
0
+ # :log_auto_flush<Boolean>:: whether the log should automatically
0
+ # flush after new messages are
0
+ # added, defaults to true.
0
+ #
0
+ # :log_file<IO>:: IO for logger. Default is STDOUT.
0
+ #
0
+ # :log_level<Symbol>:: logger level, default is :warn
0
+ #
0
+ # :disabled_components<Array[Symbol]>::
0
+ # array of disabled component names,
0
+ # for instance, to disable json gem,
0
+ # specify :json. Default is empty array.
0
+ #
0
+ # :deferred_actions<Array(Symbol, String)]>::
0
+ # names of actions that should be deferred
0
+ # no matter what controller they belong to.
0
+ # Default is empty array.
0
+ #
0
+ # Some of these options come from command line on Merb
0
+ # application start, some of them are set in Merb init file
0
+ # or environment-specific.
0
     def load_config(options = {})
0
       Merb::Config.setup({ :log_file => STDOUT, :log_level => :warn, :log_auto_flush => true }.merge(options))
0
       Merb::BootLoader::Logger.run
0
     end
0
-
0
+
0
     # Load all basic dependencies (selected BootLoaders only).
0
     #
0
     # ==== Parameters
0
0
0
@@ -223,14 +337,16 @@
0
       Merb::BootLoader::Dependencies.run
0
       Merb::BootLoader::BeforeAppRuns.run
0
     end
0
-
0
- # Reload the framework.
0
+
0
+ # Reload application and framework classes.
0
+ # See Merb::BootLoader::ReloadClasses for details.
0
     def reload
0
       Merb::BootLoader::ReloadClasses.reload
0
     end
0
-
0
+
0
     # ==== Returns
0
- # Boolean:: True if Merb is running via spec_helper.rb or other TEST scenario.
0
+ # Boolean:: True if Merb environment is testing for instance,
0
+ # Merb is running with RSpec, Test::Unit of other testing facility.
0
     def testing?
0
       $TESTING || Merb::Config[:testing]
0
     end
0
@@ -238,7 +354,7 @@
0
     # Ask the question about which environment you're in.
0
     # ==== Parameters
0
     # env<Symbol, String>:: Name of the environment to query
0
- #
0
+ #
0
     # ==== Examples
0
     # Merb.env #=> production
0
     # Merb.env?(:production) #=> true
0
@@ -255,6 +371,10 @@
0
     # ==== Returns
0
     # Hash:: The current configuration.
0
     #
0
+ # ==== Notes
0
+ # See Merb::GlobalHelpers.load_config for configuration
0
+ # options list.
0
+ #
0
     # ==== Examples
0
     # Merb.config do
0
     # beer "good"
0
0
@@ -266,13 +386,13 @@
0
     # session_secret_key "0d05a226affa226623eb18700"
0
     # exception_details true
0
     # reload_classes true
0
- # reload_time 0.5
0
+ # reload_time 0.5
0
     # end
0
     def config(&block)
0
       Merb::Config.configure(&block) if block_given?
0
       Config
0
     end
0
-
0
+
0
     # Disables the given core components, like a Gem for example.
0
     #
0
     # ==== Parameters
0
0
0
0
0
0
0
@@ -280,41 +400,48 @@
0
     def disable(*components)
0
       disabled_components.push *components
0
     end
0
-
0
+
0
     # ==== Parameters
0
     # Array:: All components that should be disabled.
0
     def disabled_components=(components)
0
       disabled_components.replace components
0
     end
0
-
0
+
0
     # ==== Returns
0
     # Array:: All components that have been disabled.
0
     def disabled_components
0
       Merb::Config[:disabled_components] ||= []
0
     end
0
-
0
+
0
     # ==== Returns
0
     # Boolean:: True if all components (or just one) are disabled.
0
     def disabled?(*components)
0
       components.all? { |c| disabled_components.include?(c) }
0
     end
0
-
0
+
0
     # ==== Returns
0
- # Array:: All Rakefiles for plugins.
0
+ # Array(String):: Paths Rakefiles are loaded from.
0
+ #
0
+ # ==== Notes
0
+ # Recommended way to find out what paths Rakefiles
0
+ # are loaded from.
0
     def rakefiles
0
       @rakefiles ||= ['merb-core/test/tasks/spectasks']
0
     end
0
 
0
     # ==== Parameters
0
- # *rakefiles:: Rakefiles to add to the list of plugin Rakefiles.
0
+ # *rakefiles:: Rakefile pathss to add to the list of Rakefiles.
0
+ #
0
+ # ==== Notes
0
+ # Recommended way to add Rakefiles load path for plugins authors.
0
     def add_rakefiles(*rakefiles)
0
       @rakefiles ||= ['merb-core/test/tasks/spectasks']
0
       @rakefiles += rakefiles
0
     end
0
-
0
-
0
-
0
-
0
+
0
+
0
+
0
+
0
   end
0
 end
0
 
...
160
161
162
163
 
164
165
166
...
160
161
162
 
163
164
165
166
0
@@ -160,7 +160,7 @@
0
 # path, and whose values can be passed into Merb.push_path (see Merb.push_path
0
 # for full details).
0
 #
0
-# ==== Note
0
+# ==== Notes
0
 # All paths will default to Merb.root, so you can get a flat-file structure by
0
 # doing Merb::Config[:framework] = {}.
0
 #
...
162
163
164
165
 
166
167
168
169
...
193
194
195
196
197
 
 
198
199
200
201
202
 
 
203
204
205
...
162
163
164
 
165
166
167
168
169
...
193
194
195
 
 
196
197
198
199
200
 
 
201
202
203
204
205
0
@@ -162,7 +162,7 @@
0
             options[:merb_root] = File.expand_path(root)
0
           end
0
 
0
- opts.on("-a", "--adapter mongrel", "The rack adapter to use to run merb[mongrel, emongrel, thin, , fastcgi, webrick, runner, irb]") do |adapter|
0
+ opts.on("-a", "--adapter mongrel", "The rack adapter to use to run merb[mongrel, emongrel, thin, ebb, fastcgi, webrick, runner, irb]") do |adapter|
0
             options[:adapter] = adapter
0
           end
0
 
0
0
@@ -193,13 +193,13 @@
0
           end
0
 
0
           opts.on("-K", "--graceful PORT or all", "Gracefully kill one merb proceses by port number. Use merb -K all to gracefully kill all merbs.") do |ports|
0
- @configuration = defaults.merge(options)
0
- Merb::Server.kill(ports, 1)
0
+ options[:action] = :kill
0
+ options[:port] = ports
0
           end
0
 
0
           opts.on("-k", "--kill PORT or all", "Kill one merb proceses by port number. Use merb -k all to kill all merbs.") do |port|
0
- @configuration = defaults.merge(options)
0
- Merb::Server.kill(port, 9)
0
+ options[:action] = :kill_9
0
+ options[:port] = port
0
           end
0
 
0
           opts.on("-X", "--mutex on/off", "This flag is for turning the mutex lock on and off.") do |mutex|
...
90
91
92
93
 
94
95
96
97
...
99
100
101
102
 
103
104
 
105
106
107
...
115
116
117
118
119
 
 
120
121
122
...
322
323
324
325
 
326
327
328
...
334
335
336
337
 
338
339
340
...
90
91
92
 
93
94
95
96
97
...
99
100
101
 
102
103
 
104
105
106
107
...
115
116
117
 
 
118
119
120
121
122
...
322
323
324
 
325
326
327
328
...
334
335
336
 
337
338
339
340
0
@@ -90,7 +90,7 @@
0
   # structure for your app.
0
   #
0
   # ==== Parameters
0
- # action<~to_s>:: The controller action.
0
+ # context<~to_s>:: The controller context (the action or template name).
0
   # type<~to_s>:: The content type. Defaults to nil.
0
   # controller<~to_s>::
0
   # The name of the controller. Defaults to controller_name.
0
0
@@ -99,9 +99,9 @@
0
   # ==== Returns
0
   # String::
0
   # Indicating where to look for the template for the current controller,
0
- # action, and content-type.
0
+ # context, and content-type.
0
   #
0
- # ==== Note
0
+ # ==== Notes
0
   # The type is irrelevant for controller-types that don't support
0
   # content-type negotiation, so we default to not include it in the
0
   # superclass.
0
@@ -115,8 +115,8 @@
0
   # of controller/action.mime.type
0
   #---
0
   # @public
0
- def _template_location(action, type = nil, controller = controller_name)
0
- "#{controller}/#{action}"
0
+ def _template_location(context, type = nil, controller = controller_name)
0
+ controller ? "#{controller}/#{context}" : context
0
   end
0
 
0
   # ==== Returns
0
@@ -322,7 +322,7 @@
0
   # Filter options (see class documentation under <tt>Filter Options</tt>).
0
   # &block:: Currently ignored.
0
   #
0
- # ==== Note
0
+ # ==== Notes
0
   # If the filter already exists, its options will be replaced with opts.
0
   def self.after(filter = nil, opts = {}, &block)
0
     add_filter(self._after_filters, filter, opts)
0
@@ -334,7 +334,7 @@
0
   # Filter options (see class documentation under <tt>Filter Options</tt>).
0
   # &block:: A block to use as a filter if filter is nil.
0
   #
0
- # ==== Note
0
+ # ==== Notes
0
   # If the filter already exists, its options will be replaced with opts.
0
   def self.before(filter = nil, opts = {}, &block)
0
     add_filter(self._before_filters, filter || block, opts)
...
58
59
60
61
 
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
...
101
102
103
104
105
106
107
108
 
 
 
 
 
 
 
 
 
 
 
 
109
110
111
112
113
114
115
116
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
117
118
119
120
121
122
123
124
125
126
127
128
129
130
 
 
 
 
 
 
131
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
132
133
134
135
136
137
 
138
139
 
140
141
142
143
 
144
145
 
146
147
 
148
149
 
150
151
 
152
153
 
154
155
 
156
157
158
159
 
160
161
 
162
163
 
164
165
 
166
167
 
168
169
 
170
171
 
172
173
174
175
 
176
177
178
179
 
180
181
 
182
183
 
184
185
 
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
...
190
191
192
193
 
194
195
 
196
197
 
198
199
 
200
201
 
202
203
 
204
205
 
206
207
 
208
209
 
210
211
 
212
213
 
214
215
 
216
217
 
218
219
220
221
 
222
223
 
224
225
 
226
227
 
228
229
 
230
231
232
 
233
234
235
...
58
59
60
 
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
...
101
102
103
 
 
 
 
 
104
105
106
107
108
109
110
111
112
113
114
115
116
 
 
 
 
 
 
 
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
 
 
 
 
 
 
 
 
 
 
 
 
 
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
 
182
183
 
184
185
186
187
 
188
189
 
190
191
 
192
193
 
194
195
 
196
197
 
198
199
 
200
201
202
203
 
204
205
 
206
207
 
208
209
 
210
211
 
212
213
 
214
215
 
216
217
218
219
 
220
221
222
223
 
224
225
 
226
227
 
228
229
 
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
...
235
236
237
 
238
239
 
240
241
 
242
243
 
244
245
 
246
247
 
248
249
 
250
251
 
252
253
 
254
255
 
256
257
 
258
259
 
260
261
 
262
263
264
265
 
266
267
 
268
269
 
270
271
 
272
273
 
274
275
276
 
277
278
279
280
0
@@ -58,7 +58,7 @@
0
   # "team@cowboys.com",
0
   # "Exception occured at #{Time.now}",
0
   # params[:exception])
0
- # render :inline => 'Something is wrong, but the team are on it!'
0
+ # render 'Something is wrong, but the team are on it!'
0
   # end
0
   #
0
   # Note: The special param[:exception] is available in all Exception actions
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
@@ -101,88 +101,133 @@
0
       # String:: The snake cased name of the error without the namespace.
0
       def name; self.class.name; end
0
 
0
- # ==== Returns
0
- # String:: The snake cased name of the class without the namespace.
0
- def self.name
0
- to_s.snake_case.split('::').last