Class: Hiser::Cli

Inherits:
Object
  • Object
show all
Includes:
Retrospec::Plugins::V1::ModuleHelpers
Defined in:
lib/hiser.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.generate(path) ⇒ Object



13
14
15
16
# File 'lib/hiser.rb', line 13

def self.generate(path)
  instance = Hiser::Cli.new
  instance.generate_files(path)
end

.startObject



18
19
20
21
# File 'lib/hiser.rb', line 18

def self.start
  instance = Hiser::Cli.new
  instance.run
end

Instance Method Details

#generate_files(path, spec_object = nil) ⇒ Object



30
31
32
# File 'lib/hiser.rb', line 30

def generate_files(path, spec_object=nil)
  safe_create_module_files(template_dir, path, spec_object)
end

#runObject

produces all the files identified in the output_object_files hash



24
25
26
27
28
# File 'lib/hiser.rb', line 24

def run
  files.each do | file_hash|
    file_hash.each {| map_name, file_name | generate_file(map_name, file_name) }
  end
end