Class: Rabbit::Command::RabbitTheme

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

Constant Summary

Constants included from GetText

GetText::DOMAIN

Class Method Summary collapse

Instance Method Summary collapse

Methods included from GetText

included

Constructor Details

#initializeRabbitTheme

Returns a new instance of RabbitTheme.


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

def initialize
  @theme_conf = nil
  @author_conf = nil
  @logger = nil
end

Class Method Details

.run(*arguments) ⇒ Object


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

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

Instance Method Details

#run(arguments) ⇒ Object


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

def run(arguments)
  @options, @logger = 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

  generate
  @author_conf.save
  true
end