Class: Slack::CLI::Config

Inherits:
Base
  • Object
show all
Defined in:
lib/slack/cli/config.rb

Instance Method Summary collapse

Instance Method Details

#set(*args) ⇒ Object



6
7
8
9
10
11
12
13
14
# File 'lib/slack/cli/config.rb', line 6

def set(*args)
  unless Dir.exist?(Slack::CLI::CONFIG_DIR)
    Dir.mkdir(Slack::CLI::CONFIG_DIR)
  end

  File.open(Slack::CLI::CONFIG_FILE, 'w') do |f|
    f.puts args
  end
end