Top Level Namespace

Defined Under Namespace

Modules: Fumoffu Classes: ApplicationController, ApplicationHandler, Object

Constant Summary collapse

IS_FROM_JAR =
false
ROOT_DIR =
"#{Pathname.new(__FILE__).dirname}/../../"

Instance Method Summary collapse

Instance Method Details

#import_for_rubyObject



22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# File 'lib/fumoffu/generators/templates/engine/config/initializers/app_classes.rb', line 22

def import_for_ruby
  lib_dir = ROOT_DIR+"/engine/src"

  dirs = [
    "utils",
    "commons",
    "models",
    "actions/controllers",
    "actions/helpers",
    "actions/handlers"
    ]
  
   # Example of additional src directory
   #  dirs << "db"

  dirs.each do |dir|
    Dir[lib_dir+"/#{dir}/*.rb"].each {|file| require file }
  end
end

#import_from_jarObject



6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# File 'lib/fumoffu/generators/templates/engine/config/initializers/app_classes.rb', line 6

def import_from_jar
  #  Example
  #  this is used to import java generated file from the jar 
  #  within the application which will be running in java
  #  you need to put the name of all the required class
  %w[
    controller
    handler
    application_controller
    application_handler
    ].each do |c|
        require c
    end

end