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