Class: Ptero::Generator::TwigGenerator

Inherits:
Ptero::Generator show all
Defined in:
lib/ptero/generators/twiggenerator.rb

Overview

Generator for Twig templates

Direct Known Subclasses

LayoutGenerator, ViewGenerator

Constant Summary

Constants inherited from Ptero::Generator

TEMPLATE_PATH

Instance Attribute Summary

Attributes inherited from Ptero::Generator

#app, #dir, #name

Instance Method Summary collapse

Methods inherited from Ptero::Generator

const_missing, #content, #content_params, #filename, #generate, #generated?, #location, #reload, #remove, #template_path, #to_s, #type

Constructor Details

#initialize(name) ⇒ TwigGenerator



13
14
15
# File 'lib/ptero/generators/twiggenerator.rb', line 13

def initialize(name)
  super name.downcase
end

Instance Method Details

#extensionString



18
19
20
# File 'lib/ptero/generators/twiggenerator.rb', line 18

def extension
  'html.twig'
end

#pathString



23
24
25
# File 'lib/ptero/generators/twiggenerator.rb', line 23

def path
  'views'
end