Class: Errordite::Config

Inherits:
Object
  • Object
show all
Defined in:
lib/errordite/config.rb

Instance Method Summary collapse

Instance Method Details

#api_tokenObject



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

def api_token
  @api_token ||= ENV['ERRORDITE_TOKEN']
end

#api_token=(token) ⇒ Object



9
10
11
# File 'lib/errordite/config.rb', line 9

def api_token=(token)
  @api_token = token
end

#clientObject



37
38
39
# File 'lib/errordite/config.rb', line 37

def client
  @client ||= Errordite::Client.new(server, port)
end

#client=(client) ⇒ Object



41
42
43
# File 'lib/errordite/config.rb', line 41

def client=(client)
  @client = client
end

#loggerObject



29
30
31
32
33
34
35
# File 'lib/errordite/config.rb', line 29

def logger
  @logger ||= begin
    l = Logger.new(STDOUT)
    l.level = Logger::WARN
    l
  end
end

#portObject



21
22
23
# File 'lib/errordite/config.rb', line 21

def port
  @port ||= 443
end

#port=(p) ⇒ Object



25
26
27
# File 'lib/errordite/config.rb', line 25

def port=(p)
  @port = p
end

#serverObject



13
14
15
# File 'lib/errordite/config.rb', line 13

def server
  @server ||= 'www.errordite.com'
end

#server=(s) ⇒ Object



17
18
19
# File 'lib/errordite/config.rb', line 17

def server=(s)
  @server = s
end