Class: Redmine::Reporting::Configuration
- Inherits:
-
Object
- Object
- Redmine::Reporting::Configuration
- Defined in:
- lib/redmine/reporting/configuration.rb
Instance Attribute Summary collapse
-
#api_key ⇒ Object
Returns the value of attribute api_key.
-
#base_url ⇒ Object
Returns the value of attribute base_url.
-
#category ⇒ Object
Returns the value of attribute category.
-
#http_options ⇒ Object
readonly
Returns the value of attribute http_options.
-
#project ⇒ Object
Returns the value of attribute project.
-
#tracker ⇒ Object
Returns the value of attribute tracker.
Instance Method Summary collapse
- #proxy(hostname, port) ⇒ Object
- #proxy_auth(username, password) ⇒ Object
- #to_hash ⇒ Object (also: #to_h)
Instance Attribute Details
#api_key ⇒ Object
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_url ⇒ Object
Returns the value of attribute base_url.
4 5 6 |
# File 'lib/redmine/reporting/configuration.rb', line 4 def base_url @base_url end |
#category ⇒ Object
Returns the value of attribute category.
8 9 10 |
# File 'lib/redmine/reporting/configuration.rb', line 8 def category @category end |
#http_options ⇒ Object (readonly)
Returns the value of attribute http_options.
9 10 11 |
# File 'lib/redmine/reporting/configuration.rb', line 9 def @http_options end |
#project ⇒ Object
Returns the value of attribute project.
6 7 8 |
# File 'lib/redmine/reporting/configuration.rb', line 6 def project @project end |
#tracker ⇒ Object
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_hash ⇒ Object 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. } end |