Class: Ptero::Generator::GitignoreGenerator

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

Overview

Generate .htaccess files for apache routing

Constant Summary

Constants inherited from Ptero::Generator

TEMPLATE_PATH

Instance Attribute Summary collapse

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, #path, #reload, #remove, #template_path, #to_s, #type

Constructor Details

#initialize(*ignores) ⇒ GitignoreGenerator

This is a dotfile, there are no parameters, and the name is always “”



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

def initialize(*ignores)
  @ignores = ignores
  super ''
end

Instance Attribute Details

#ignoresObject (readonly)

Returns the value of attribute ignores.



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

def ignores
  @ignores
end

Instance Method Details

#extensionString

Returns “gitignore”.

Returns:

  • (String)

    “gitignore”



21
22
23
# File 'lib/ptero/generators/gitignoregenerator.rb', line 21

def extension
  'gitignore'
end