Class: Vsvipergen::Generator
- Inherits:
-
Object
- Object
- Vsvipergen::Generator
- Defined in:
- lib/vsvipergen.rb
Overview
abstract class for file generator
Direct Known Subclasses
ViperObjcContractsFileGenerator, ViperObjcInteractorFileGenerator, ViperObjcModelFileGenerator, ViperObjcPresenterFileGenerator, ViperObjcRouterFileGenerator, ViperObjcViewControllerFileGenerator
Instance Attribute Summary collapse
-
#currPath ⇒ Object
Returns the value of attribute currPath.
-
#generatedFilePaths ⇒ Object
Returns the value of attribute generatedFilePaths.
-
#now ⇒ Object
Returns the value of attribute now.
-
#prefix ⇒ Object
Returns the value of attribute prefix.
-
#year ⇒ Object
Returns the value of attribute year.
Instance Method Summary collapse
Instance Attribute Details
#currPath ⇒ Object
Returns the value of attribute currPath.
7 8 9 |
# File 'lib/vsvipergen.rb', line 7 def currPath @currPath end |
#generatedFilePaths ⇒ Object
Returns the value of attribute generatedFilePaths.
10 11 12 |
# File 'lib/vsvipergen.rb', line 10 def generatedFilePaths @generatedFilePaths end |
#now ⇒ Object
Returns the value of attribute now.
8 9 10 |
# File 'lib/vsvipergen.rb', line 8 def now @now end |
#prefix ⇒ Object
Returns the value of attribute prefix.
6 7 8 |
# File 'lib/vsvipergen.rb', line 6 def prefix @prefix end |
#year ⇒ Object
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 |
#makeFiles ⇒ Object
21 22 |
# File 'lib/vsvipergen.rb', line 21 def makeFiles end |