Class: Garb::ReportResponse

Inherits:
Object
  • Object
show all
Defined in:
lib/garb/report_response.rb

Constant Summary collapse

KEYS =
['dxp:metric', 'dxp:dimension']

Instance Method Summary collapse

Constructor Details

#initialize(response_body, instance_klass = OpenStruct) ⇒ ReportResponse

Returns a new instance of ReportResponse.



5
6
7
8
# File 'lib/garb/report_response.rb', line 5

def initialize(response_body, instance_klass = OpenStruct)
  @xml = response_body
  @instance_klass = instance_klass
end

Instance Method Details

#resultsObject



10
11
12
13
14
15
16
17
18
# File 'lib/garb/report_response.rb', line 10

def results
  if @results.nil?
    @results = ResultSet.new(parse)
    @results.total_results = parse_total_results
    @results.sampled = parse_sampled_flag
  end

  @results
end

#sampled?Boolean

Returns:

  • (Boolean)


20
21
# File 'lib/garb/report_response.rb', line 20

def sampled?
end