Class: GenRouting
- Inherits:
-
Thor::Group
- Object
- Thor::Group
- GenRouting
- Includes:
- Thor::Actions
- Defined in:
- lib/jt-mobile-kit-generator/gen_routing/gen_routing.rb
Instance Method Summary collapse
- #gen ⇒ Object
-
#initialize(args = [], options = {}, config = {}) ⇒ GenRouting
constructor
A new instance of GenRouting.
Constructor Details
#initialize(args = [], options = {}, config = {}) ⇒ GenRouting
Returns a new instance of GenRouting.
6 7 8 9 |
# File 'lib/jt-mobile-kit-generator/gen_routing/gen_routing.rb', line 6 def initialize(args=[], ={}, config={}) super self.destination_root= "" end |
Instance Method Details
#gen ⇒ Object
13 14 15 16 17 18 |
# File 'lib/jt-mobile-kit-generator/gen_routing/gen_routing.rb', line 13 def gen page_name = name controller_name = name content = ERB.new File.read("#{GenRouting.source_root}/routing.js.erb") inject_into_file "js/routes.js",content.result(binding), :after => "//routing generate" end |