Module: Jirawatch::CLI::AuthenticatedCommand
Class Method Summary
collapse
#login, #save_credentials
Class Method Details
.included(base) ⇒ Object
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
# File 'lib/jirawatch/cli/authenticated_command.rb', line 8
def self.included(base)
def base.method_added(name)
if name.eql? :call and not method_defined? :alias_call
alias_method :alias_call, :call
define_method(:call) do |**args, &block|
@jira_client = login
fail! Jirawatch.strings.error_login_info_not_found if @jira_client.nil?
puts "Connected to #{@jira_client.ServerInfo.all.attrs["baseUrl"]}\n\n"
send :alias_call, **args
end
end
end
end
|