Class: TShield::Server
Overview
Class Method Summary
collapse
#add_headers, build_headers, #configuration, #domain, #treat
Class Method Details
.load_controllers ⇒ Object
26
27
28
29
30
31
32
33
34
35
36
37
38
|
# File 'lib/tshield/server.rb', line 26
def self.load_controllers
return unless File.exist?('controllers')
Dir.entries('controllers').each do |entry|
next if entry =~ /^\.\.?$/
entry.gsub!('.rb', '')
require File.join('.', 'controllers', entry)
controller_name = entry.split('_').collect(&:capitalize).join
include Module.const_get("#{controller_name}::Actions")
register Module.const_get(controller_name)
end
end
|
.register_resources ⇒ Object
.run! ⇒ Object
40
41
42
43
44
|
# File 'lib/tshield/server.rb', line 40
def self.run!
register_resources
require 'byebug'
super
end
|