Class: ChupaText::Command::ChupaTextGenerateDecomposer

Inherits:
Object
  • Object
show all
Defined in:
lib/chupa-text/command/chupa-text-generate-decomposer.rb

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeChupaTextGenerateDecomposer

Returns a new instance of ChupaTextGenerateDecomposer.



30
31
32
33
34
35
36
37
38
# File 'lib/chupa-text/command/chupa-text-generate-decomposer.rb', line 30

def initialize
  @name = nil
  @extensions = nil
  @mime_types = nil
  @author = guess_author
  @email = guess_email
  @license = lgplv2_1_or_later_license
  @parser = create_option_parser
end

Class Method Details

.run(*arguments) ⇒ Object



24
25
26
27
# File 'lib/chupa-text/command/chupa-text-generate-decomposer.rb', line 24

def run(*arguments)
  command = new
  command.run(*arguments)
end

Instance Method Details

#run(*arguments) ⇒ Object



40
41
42
43
44
45
46
47
48
49
50
# File 'lib/chupa-text/command/chupa-text-generate-decomposer.rb', line 40

def run(*arguments)
  begin
    @parser.parse!(arguments)
  rescue OptionParser::ParseError
    puts($!.message)
    return false
  end
  read_missing_parameters
  generate
  true
end