class Sfctl::Commands::Time::Init

Public Class Methods

new(options) click to toggle source
# File lib/sfctl/commands/time/init.rb, line 7
def initialize(options)
  @options = options

  @pastel = Pastel.new(enabled: !@options['no-color'])
end

Public Instance Methods

execute(output: $stdout) click to toggle source
# File lib/sfctl/commands/time/init.rb, line 13
def execute(output: $stdout)
  read_link_config
  output.puts @pastel.yellow('.sflink is already created.')
rescue ::TTY::Config::ReadError
  save_link_config!
  output.puts @pastel.green('.sflink successfully created.')
end