Class: Gitdig::Commands::Config

Inherits:
Thor
  • Object
show all
Defined in:
lib/gitdig/commands/config.rb,
lib/gitdig/commands/config/org.rb,
lib/gitdig/commands/config/token.rb

Defined Under Namespace

Classes: Org, Token

Instance Method Summary collapse

Instance Method Details

#org(name) ⇒ Object



29
30
31
32
33
34
35
36
37
# File 'lib/gitdig/commands/config.rb', line 29

def org(name)
  if options[:help]
    invoke :help, ['org']
  else
    require_relative 'config/org'
    command = Gitdig::Commands::Config::Org.new(name, options)
    ensure_scope(command).execute
  end
end

#token(token) ⇒ Object



16
17
18
19
20
21
22
23
24
# File 'lib/gitdig/commands/config.rb', line 16

def token(token)
  if options[:help]
    invoke :help, ['token']
  else
    require_relative 'config/token'
    command = Gitdig::Commands::Config::Token.new(token, options)
    ensure_scope(command).execute
  end
end