Class: Vsvipergen::Generator

Inherits:
Object
  • Object
show all
Defined in:
lib/vsvipergen.rb

Overview

abstract class for file generator

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#currPathObject

Returns the value of attribute currPath.



7
8
9
# File 'lib/vsvipergen.rb', line 7

def currPath
  @currPath
end

#generatedFilePathsObject

Returns the value of attribute generatedFilePaths.



10
11
12
# File 'lib/vsvipergen.rb', line 10

def generatedFilePaths
  @generatedFilePaths
end

#nowObject

Returns the value of attribute now.



8
9
10
# File 'lib/vsvipergen.rb', line 8

def now
  @now
end

#prefixObject

Returns the value of attribute prefix.



6
7
8
# File 'lib/vsvipergen.rb', line 6

def prefix
  @prefix
end

#yearObject

Returns the value of attribute year.



9
10
11
# File 'lib/vsvipergen.rb', line 9

def year
  @year
end

Instance Method Details

#init(prefix, now, year) ⇒ Object



12
13
14
15
16
17
18
19
# File 'lib/vsvipergen.rb', line 12

def init(prefix, now, year)
  @prefix = prefix
  @currPath = Dir.pwd + "/#{prefix.strip.downcase}"
  @now = now
  @year = year
  @generatedFilePaths = []
  Dir.mkdir(currPath) unless File.exists?(currPath)
end

#makeFilesObject



21
22
# File 'lib/vsvipergen.rb', line 21

def makeFiles
end