Class: QaAtMigration::ThorCommands

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

Instance Method Summary collapse

Instance Method Details

#generate_csv(*output_filename) ⇒ Object



21
22
23
24
25
26
27
28
# File 'lib/qa_at_migration.rb', line 21

def generate_csv *output_filename
  output_filename = output_filename.length > 0 ? "#{output_filename[0]}.csv" : nil
  if output_filename
    Generator.new.generate options[:sourcepath], options[:targetpath], output_filename
  else
    Generator.new.generate options[:sourcepath], options[:targetpath]
  end
end

#hello(language = "english") ⇒ Object



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

def hello(language = "english")
  translator = Translator.new(language)
  puts translator.hi
end

#say_hello(name = nil) ⇒ Object



35
36
37
38
39
40
41
# File 'lib/qa_at_migration.rb', line 35

def say_hello(name = nil)
  if name
    puts "hola #{name}"
  else
    puts "aún no sé cual es tu nombre"
  end
end