Class: TShield::Server
Overview
Class Method Summary
collapse
#add_headers, build_headers, #configuration, #delay, #domain, #treat, #treat_headers_by_domain
Class Method Details
.load_controllers ⇒ Object
44
45
46
47
48
49
50
51
52
53
54
55
56
|
# File 'lib/tshield/server.rb', line 44
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
58
59
60
61
|
# File 'lib/tshield/server.rb', line 58
def self.run!
register_resources
super
end
|