Class: HowlingMine::Config

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

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#api_keyObject

Returns the value of attribute api_key.



4
5
6
# File 'lib/howlingmine/config.rb', line 4

def api_key
  @api_key
end

Class Method Details

.api_keyObject



6
7
8
# File 'lib/howlingmine/config.rb', line 6

def self.api_key
  params[:api_key]
end

.api_key=(k) ⇒ Object



10
11
12
# File 'lib/howlingmine/config.rb', line 10

def self.api_key=(k)
  params[:api_key] = k
end

.hostObject



18
19
20
# File 'lib/howlingmine/config.rb', line 18

def self.host
  @@host ||= 'localhost'
end

.host=(h) ⇒ Object



22
23
24
# File 'lib/howlingmine/config.rb', line 22

def self.host=(h)
  @@host = h
end

.paramsObject



14
15
16
# File 'lib/howlingmine/config.rb', line 14

def self.params
  @@params ||= {}
end

.portObject



30
31
32
# File 'lib/howlingmine/config.rb', line 30

def self.port
  @@port ||= 80
end

.port=(p) ⇒ Object



26
27
28
# File 'lib/howlingmine/config.rb', line 26

def self.port=(p)
  @@port = p
end

.projectObject



42
43
44
# File 'lib/howlingmine/config.rb', line 42

def self.project
  params[:project]
end

.project=(p) ⇒ Object



46
47
48
# File 'lib/howlingmine/config.rb', line 46

def self.project=(p)
  params[:project] = p
end

.protocolObject



50
51
52
# File 'lib/howlingmine/config.rb', line 50

def self.protocol
  use_ssl ? 'https' : 'http'
end

.trackerObject



58
59
60
# File 'lib/howlingmine/config.rb', line 58

def self.tracker
  params[:tracker] ||= 'Bug'
end

.tracker=(t) ⇒ Object



54
55
56
# File 'lib/howlingmine/config.rb', line 54

def self.tracker=(t)
  params[:tracker] = t
end

.use_sslObject



34
35
36
# File 'lib/howlingmine/config.rb', line 34

def self.use_ssl
  @@use_ssl ||= false
end

.use_ssl=(yn) ⇒ Object



38
39
40
# File 'lib/howlingmine/config.rb', line 38

def self.use_ssl=(yn)
  @@use_ssl ||= yn
end