Class: Ptero::Generator::ViewGenerator
- Inherits:
-
TwigGenerator
- Object
- Ptero::Generator
- TwigGenerator
- Ptero::Generator::ViewGenerator
- Defined in:
- lib/ptero/generators/viewgenerator.rb
Overview
Generator for a view that extends a layout
Direct Known Subclasses
Constant Summary
Constants inherited from Ptero::Generator
Instance Attribute Summary collapse
-
#parent ⇒ Object
readonly
Returns the value of attribute parent.
Attributes inherited from Ptero::Generator
Instance Method Summary collapse
-
#initialize(name, parent = 'application') ⇒ ViewGenerator
constructor
A new instance of ViewGenerator.
Methods inherited from TwigGenerator
Methods inherited from Ptero::Generator
const_missing, #content, #content_params, #extension, #filename, #generate, #generated?, #location, #path, #reload, #remove, #template_path, #to_s, #type
Constructor Details
#initialize(name, parent = 'application') ⇒ ViewGenerator
Returns a new instance of ViewGenerator.
17 18 19 20 |
# File 'lib/ptero/generators/viewgenerator.rb', line 17 def initialize(name,parent='application') super(name) @parent = parent end |
Instance Attribute Details
#parent ⇒ Object (readonly)
Returns the value of attribute parent.
22 23 24 |
# File 'lib/ptero/generators/viewgenerator.rb', line 22 def parent @parent end |