Class: Redmine::Reporting::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/redmine/reporting/configuration.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#api_keyObject

Returns the value of attribute api_key.



5
6
7
# File 'lib/redmine/reporting/configuration.rb', line 5

def api_key
  @api_key
end

#base_urlObject

Returns the value of attribute base_url.



4
5
6
# File 'lib/redmine/reporting/configuration.rb', line 4

def base_url
  @base_url
end

#categoryObject

Returns the value of attribute category.



8
9
10
# File 'lib/redmine/reporting/configuration.rb', line 8

def category
  @category
end

#http_optionsObject (readonly)

Returns the value of attribute http_options.



9
10
11
# File 'lib/redmine/reporting/configuration.rb', line 9

def http_options
  @http_options
end

#projectObject

Returns the value of attribute project.



6
7
8
# File 'lib/redmine/reporting/configuration.rb', line 6

def project
  @project
end

#trackerObject

Returns the value of attribute tracker.



7
8
9
# File 'lib/redmine/reporting/configuration.rb', line 7

def tracker
  @tracker
end

Instance Method Details

#proxy(hostname, port) ⇒ Object



11
12
13
14
15
# File 'lib/redmine/reporting/configuration.rb', line 11

def proxy(hostname, port)
  @http_options ||= {}
  @http_options[:http_proxyaddr] = hostname
  @http_options[:http_proxyport] = port
end

#proxy_auth(username, password) ⇒ Object



17
18
19
20
21
# File 'lib/redmine/reporting/configuration.rb', line 17

def proxy_auth(username, password)
  @http_options ||= {}
  @http_options[:http_proxyuser] = username
  @http_options[:http_proxypass] = password
end

#to_hashObject Also known as: to_h



23
24
25
26
27
28
29
30
31
32
# File 'lib/redmine/reporting/configuration.rb', line 23

def to_hash
  {
    base_url: self.base_url,
    api_key: self.api_key,
    project: self.project,
    tracker: self.tracker,
    category: self.category,
    http_options: self.http_options
  }
end