Class: WIS::DOM::IssueResults

Inherits:
Results
  • Object
show all
Defined in:
lib/dom/issue_results.rb

Instance Attribute Summary collapse

Attributes inherited from Results

#hits

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(hits, issues) ⇒ IssueResults

Returns a new instance of IssueResults.



4
5
6
7
# File 'lib/dom/issue_results.rb', line 4

def initialize(hits, issues)
	super(hits)
	@issues = issues
end

Instance Attribute Details

#issuesObject (readonly)

Returns the value of attribute issues.



2
3
4
# File 'lib/dom/issue_results.rb', line 2

def issues
  @issues
end

Class Method Details

.adapt_json(data) ⇒ Object



9
10
11
12
13
14
15
16
# File 'lib/dom/issue_results.rb', line 9

def self.adapt_json(data)
	issues = []
	data["Issues"].each do |i|
		issues << WIS::DOM::Issue.new(i["ID"], i["Description"])
	end
	
	WIS::DOM::IssueResults.new(data["Hits"], issues)
end