module Thor::Shell::Mean
Public Instance Methods
message_for(topic, state, *parameters)
click to toggle source
# File lib/thor/shell/mean.rb, line 9 def message_for(topic, state, *parameters) messages[state.to_s][topic.to_s].sample % parameters end
messages()
click to toggle source
# File lib/thor/shell/mean.rb, line 4 def messages path = File.expand_path("../../../../config/locales/en.yml", __FILE__) @messages ||= YAML.load_file(path) end
say_boring()
click to toggle source
# File lib/thor/shell/mean.rb, line 27 def say_boring puts say_status(nil, messages["boring"].sample) say_waiting end
say_message_for(topic, state, *parameters)
click to toggle source
# File lib/thor/shell/mean.rb, line 13 def say_message_for(topic, state, *parameters) say_status(topic, message_for(topic, state, *parameters)) end
say_until(*args) { || ... }
click to toggle source
# File lib/thor/shell/mean.rb, line 17 def say_until(*args) say(*args) until yield say end
say_waiting()
click to toggle source
# File lib/thor/shell/mean.rb, line 22 def say_waiting status = set_color("waiting".rjust(12), :green, true) say("#{status} ", nil, false) end