Class: RubocopPr::Repository
- Inherits:
-
Object
- Object
- RubocopPr::Repository
- Defined in:
- lib/rubocop_pr/repository.rb
Overview
abstract repository class
Direct Known Subclasses
Class Method Summary collapse
- .all ⇒ Object
-
.checks ⇒ Object
Array of Class which respond_to ::call and raise if check do not pass.
-
.create_issue ⇒ Object
return Integer issue number.
-
.create_pull_request ⇒ Object
return Integer pull_request number.
- .inherited(base) ⇒ Object
Class Method Details
.all ⇒ Object
5 6 7 |
# File 'lib/rubocop_pr/repository.rb', line 5 def all @all ||= ::ActiveSupport::HashWithIndifferentAccess.new end |
.checks ⇒ Object
Array of Class which respond_to ::call and raise if check do not pass
14 15 16 |
# File 'lib/rubocop_pr/repository.rb', line 14 def checks [] end |
.create_issue ⇒ Object
return Integer issue number
19 20 21 |
# File 'lib/rubocop_pr/repository.rb', line 19 def create_issue(*) raise NotImplemented, 'should be implemented on sub-class' end |
.create_pull_request ⇒ Object
return Integer pull_request number
24 25 26 |
# File 'lib/rubocop_pr/repository.rb', line 24 def create_pull_request(*) raise NotImplemented, 'should be implemented on sub-class' end |
.inherited(base) ⇒ Object
9 10 11 |
# File 'lib/rubocop_pr/repository.rb', line 9 def inherited(base) all[base.name.demodulize.underscore] = base end |