Class: Relish::Command::Config

Inherits:
Base
  • Object
show all
Defined in:
lib/relish/commands/config.rb

Constant Summary

Constants inherited from Base

Base::DEFAULT_HOST, Base::GLOBAL_OPTIONS_FILE, Base::LOCAL_OPTIONS_FILE

Instance Attribute Summary

Attributes inherited from Base

#args

Instance Method Summary collapse

Methods inherited from Base

#api_token, #get_options, #get_param, #initialize, #organization, #parsed_options_file, #project, #resource, #url

Constructor Details

This class inherits a constructor from Relish::Command::Base

Instance Method Details

#defaultObject



5
6
7
# File 'lib/relish/commands/config.rb', line 5

def default
  show
end

#showObject



9
10
11
12
13
14
15
# File 'lib/relish/commands/config.rb', line 9

def show
  puts(if File.exists?(LOCAL_OPTIONS_FILE)
    IO.read(LOCAL_OPTIONS_FILE)
  else
    "No #{LOCAL_OPTIONS_FILE} file exists"
  end)
end