Class: Ptero::Generator::ControllerGenerator
- Inherits:
-
PHPClassGenerator
- Object
- Ptero::Generator
- PHPGenerator
- PHPClassGenerator
- Ptero::Generator::ControllerGenerator
- Defined in:
- lib/ptero/generators/controllergenerator.rb
Overview
controllergenerator.rb
generate Dinosaur controller objects
Direct Known Subclasses
Constant Summary
Constants inherited from Ptero::Generator
Instance Attribute Summary
Attributes inherited from PHPClassGenerator
Attributes inherited from Ptero::Generator
Instance Method Summary collapse
-
#initialize(name, parent = 'Application') ⇒ ControllerGenerator
constructor
A new instance of ControllerGenerator.
-
#path ⇒ String
Superclass_path/controllers.
Methods inherited from PHPGenerator
Methods inherited from Ptero::Generator
const_missing, #content, #content_params, #extension, #filename, #generate, #generated?, #location, #reload, #remove, #template_path, #to_s, #type
Constructor Details
#initialize(name, parent = 'Application') ⇒ ControllerGenerator
Returns a new instance of ControllerGenerator.
12 13 14 |
# File 'lib/ptero/generators/controllergenerator.rb', line 12 def initialize(name,parent='Application') super("#{name}Controller","#{parent}Controller") end |
Instance Method Details
#path ⇒ String
Returns superclass_path/controllers.
17 18 19 |
# File 'lib/ptero/generators/controllergenerator.rb', line 17 def path "#{super}/controllers" end |