Class: Rabbit::Command::RabbitSlide

Inherits:
Object
  • Object
show all
Includes:
GetText, PathManipulatable
Defined in:
lib/rabbit/command/rabbit-slide.rb

Defined Under Namespace

Classes: Data, IntegerMapper, SlideBaseNameMapper, SlideHeightMapper, SlideIDMapper, SlideMarkupLanguageMapper, SlideWidthMapper, TextMapper

Constant Summary

Constants included from GetText

GetText::DOMAIN

Class Method Summary collapse

Instance Method Summary collapse

Methods included from GetText

included

Constructor Details

#initializeRabbitSlide

Returns a new instance of RabbitSlide.



63
64
65
66
67
# File 'lib/rabbit/command/rabbit-slide.rb', line 63

def initialize
  @use_gui = true
  @data = Data.new
  @logger = nil
end

Class Method Details

.run(*arguments) ⇒ Object



32
33
34
# File 'lib/rabbit/command/rabbit-slide.rb', line 32

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

Instance Method Details

#run(arguments) ⇒ Object



69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
# File 'lib/rabbit/command/rabbit-slide.rb', line 69

def run(arguments)
  parse_command_line_arguments(arguments)

  if @use_gui
    return false unless show_gui
  end

  validate
  unless @validation_errors.empty?
    messages = (@validation_errors + [_("See --help for example")])
    @logger.error(messages.join("\n"))
    return false
  end

  run_command
  @data.save
  true
end