Class: Accesslint::Ci::Commenter

Inherits:
Object
  • Object
show all
Defined in:
lib/accesslint/ci/commenter.rb

Defined Under Namespace

Classes: CommenterError

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(errors) ⇒ Commenter

Returns a new instance of Commenter.



12
13
14
# File 'lib/accesslint/ci/commenter.rb', line 12

def initialize(errors)
  @errors = errors
end

Class Method Details

.perform(*args) ⇒ Object



8
9
10
# File 'lib/accesslint/ci/commenter.rb', line 8

def self.perform(*args)
  new(*args).perform
end

Instance Method Details

#performObject



16
17
18
19
20
# File 'lib/accesslint/ci/commenter.rb', line 16

def perform
  RestClient.post(accesslint_service_url, body: payload)
rescue CommenterError, RestClient::ExceptionWithResponse => e
  puts e.message
end