Class: JiraCommand::Jira::Base
- Inherits:
-
Object
- Object
- JiraCommand::Jira::Base
- Defined in:
- lib/jira_command/jira/base.rb
Direct Known Subclasses
Assign, Board, Epic, Issue, IssueType, List, Project, Sprint, Status, Transition, User
Instance Attribute Summary collapse
-
#config ⇒ Object
writeonly
Sets the attribute config.
-
#conn ⇒ Object
writeonly
Sets the attribute conn.
Instance Method Summary collapse
-
#initialize(config) ⇒ Base
constructor
A new instance of Base.
Constructor Details
#initialize(config) ⇒ Base
Returns a new instance of Base.
14 15 16 17 18 19 20 21 22 23 |
# File 'lib/jira_command/jira/base.rb', line 14 def initialize(config) @config = config @conn = Faraday.new(url: config[:jira_url]) do |faraday| faraday.request :url_encoded faraday.headers['Accept'] = 'application/json' faraday.headers['Content-Type'] = 'application/json' faraday.headers['Authorization'] = 'Basic ' + @config[:header_token] faraday.adapter Faraday.default_adapter end end |
Instance Attribute Details
#config=(value) ⇒ Object (writeonly)
Sets the attribute config
12 13 14 |
# File 'lib/jira_command/jira/base.rb', line 12 def config=(value) @config = value end |
#conn=(value) ⇒ Object (writeonly)
Sets the attribute conn
12 13 14 |
# File 'lib/jira_command/jira/base.rb', line 12 def conn=(value) @conn = value end |