Class: Ptero::Generator::ModelGenerator

Inherits:
PHPClassGenerator show all
Defined in:
lib/ptero/generators/modelgenerator.rb

Overview

A generator for PHP ActiveRecord Models

Instance Attribute Summary

Attributes inherited from PHPClassGenerator

#parent

Attributes inherited from Ptero::Generator

#app, #dir, #name

Instance Method Summary collapse

Methods inherited from PHPGenerator

#extension

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) ⇒ ModelGenerator

Returns a new instance of ModelGenerator.



11
12
13
# File 'lib/ptero/generators/modelgenerator.rb', line 11

def initialize(name)
  super(name)
end

Instance Method Details

#pathString

Returns superclass_path/models.

Returns:

  • (String)

    superclass_path/models



16
17
18
# File 'lib/ptero/generators/modelgenerator.rb', line 16

def path
  "#{super}/models"
end