Class: Flr::CLI

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

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.exit_on_failure?Boolean

Returns:

  • (Boolean)


22
23
24
25
26
# File 'lib/flr.rb', line 22

def self.exit_on_failure?
  puts("")
  help(CLI::Base.shell.new, false, false)
  true
end

.help(shell, subcommand = false, display_introduction = true) ⇒ Object



10
11
12
13
14
15
16
17
18
19
20
# File 'lib/flr.rb', line 10

def self.help(shell, subcommand = false, display_introduction = true)
  introduction = <<-MESSAGE
A Flutter Resource Manager CLI TooL, which can help flutter developer to auto specify assets in pubspec.yaml and generate r.g.dart file after he changes the flutter project assets.
More details see https://github.com/Fly-Mix/flr-cli

  MESSAGE
  if display_introduction
    puts(introduction)
  end
  super(shell,subcommand)
end

Instance Method Details

#initObject



44
45
46
# File 'lib/flr.rb', line 44

def init
  Command.init_all
end

#recommendObject



74
75
76
# File 'lib/flr.rb', line 74

def recommend
  Command.display_recommended_flutter_resource_structure
end

#run_commandObject



64
65
66
# File 'lib/flr.rb', line 64

def run_command
  options[:auto] ? Command.start_monitor : Command.generate_all
end

#versionObject



33
34
35
# File 'lib/flr.rb', line 33

def version
  Command.version
end