module ShellCast
Constants
- API_KEY
- API_URL
- APP_NAME
- CONFIG_DIR
- DATA_DIR
Public Class Methods
api_key()
click to toggle source
# File lib/shellcast.rb, line 17 def api_key return false unless File.exist?(API_KEY) @api_key ||= File.read(API_KEY).strip end
api_key=(key)
click to toggle source
# File lib/shellcast.rb, line 22 def api_key=(key) FileUtils.mkdir_p(CONFIG_DIR) unless File.exist?(CONFIG_DIR) File.open(API_KEY, 'w+') do |f| f.puts(key.strip) end end
shellcast_dir(shellcast_id)
click to toggle source
# File lib/shellcast.rb, line 29 def shellcast_dir(shellcast_id) File.join(ShellCast::DATA_DIR, shellcast_id.to_s) end