Class: Rabbit::Command::RabbitSlide

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

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.



37
38
39
40
41
42
43
# File 'lib/rabbit/command/rabbit-slide.rb', line 37

def initialize
  @title = nil
  @allotted_time = nil
  @slide_conf = nil
  @author_conf = nil
  @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



45
46
47
48
49
50
51
52
53
54
55
56
57
58
# File 'lib/rabbit/command/rabbit-slide.rb', line 45

def run(arguments)
  parse_command_line_arguments(arguments)

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

  run_command
  @author_conf.save
  true
end