Class: ForgeCLI::PostPostHooks
Instance Method Summary
collapse
Methods inherited from PostHooks
#initialize, run!
Instance Method Details
#add_controller_module ⇒ Object
14
15
16
17
18
|
# File 'lib/forge-cli/modules/posts/post_hooks.rb', line 14
def add_controller_module
STDOUT.puts "Adding Posts controller methods..."
cmi = ForgeCLI::ControllerModuleIncluder.new(@app, 'posts')
cmi.run!
end
|
#add_routes ⇒ Object
7
8
9
10
11
12
|
# File 'lib/forge-cli/modules/posts/post_hooks.rb', line 7
def add_routes
STDOUT.puts "Adding Routes..."
ri = ForgeCLI::RouteInstaller.new(@app, module_path)
ri.install_routes
ri.install_routes(:forge)
end
|
#module_path ⇒ Object
20
21
22
|
# File 'lib/forge-cli/modules/posts/post_hooks.rb', line 20
def module_path
File.dirname(__FILE__)
end
|
#run! ⇒ Object
2
3
4
5
|
# File 'lib/forge-cli/modules/posts/post_hooks.rb', line 2
def run!
add_routes
add_controller_module
end
|