Module: Hexabat
- Defined in:
- lib/hexabat.rb,
lib/hexabat/client.rb,
lib/hexabat/version.rb,
lib/hexabat/importer.rb,
lib/hexabat/page_range.rb,
lib/hexabat/issue_count.rb,
lib/hexabat/page_request_builder.rb,
lib/hexabat/page_response_processor.rb
Defined Under Namespace
Modules: PageRange, PageRequestBuilder
Classes: Client, EmptyPageRange, Importer, IssueCount, MultiplePageRange, PageResponseProcessor, SinglePageRange
Constant Summary
collapse
- VERSION =
"0.0.2"
Class Method Summary
collapse
Class Method Details
.import(repository, params = {}) ⇒ Object
6
7
8
9
10
11
12
13
|
# File 'lib/hexabat.rb', line 6
def self.import(repository, params = {})
Client.new(repository, params).tap do |hexabat|
hexabat.on issue_retrieved: @issue_retrieved
hexabat.on issue_count_known: @issue_count_known
hexabat.on error: @errback
hexabat.import
end
end
|
.on_error(&callback) ⇒ Object
23
24
25
|
# File 'lib/hexabat.rb', line 23
def self.on_error(&callback)
@errback = callback
end
|
.on_issue_count_known(&callback) ⇒ Object
19
20
21
|
# File 'lib/hexabat.rb', line 19
def self.on_issue_count_known(&callback)
@issue_count_known = callback
end
|
.on_issue_retrieved(&callback) ⇒ Object
15
16
17
|
# File 'lib/hexabat.rb', line 15
def self.on_issue_retrieved(&callback)
@issue_retrieved = callback
end
|