Class: PlatinaWorld::Generators::Base
- Inherits:
-
Object
- Object
- PlatinaWorld::Generators::Base
- Defined in:
- lib/platina_world/generators/base.rb
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(paths) ⇒ Base
constructor
A new instance of Base.
Constructor Details
#initialize(paths) ⇒ Base
Returns a new instance of Base.
4 5 6 |
# File 'lib/platina_world/generators/base.rb', line 4 def initialize(paths) @paths = paths end |
Instance Method Details
#call ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/platina_world/generators/base.rb', line 8 def call @paths.each do |path| file_path = path.file_path if file_exist?(file_path) PlatinaWorld::FileStatus.skip(file_path) else generate(path) PlatinaWorld::FileStatus.create(file_path) end end end |