Class: RedmineClient::Base

Inherits:
ActiveResource::Base
  • Object
show all
Defined in:
lib/redmine_client/base.rb

Direct Known Subclasses

Issue, News, Project

Class Method Summary collapse

Class Method Details

.configure(&block) ⇒ Object



5
6
7
# File 'lib/redmine_client/base.rb', line 5

def configure(&block)
  instance_eval &block
end

.token=(val) ⇒ Object

Get your API key at “My account” page



10
11
12
13
14
15
16
# File 'lib/redmine_client/base.rb', line 10

def token= val
  if val
    (descendants + [self]).each do |resource|
      resource.headers['X-Redmine-API-Key'] = val
    end
  end
end