Class: Bidu::House::Report::Multiple

Inherits:
Bidu::House::Report show all
Defined in:
lib/bidu/house/report/multiple.rb

Constant Summary

Constants inherited from Bidu::House::Report

ALLOWED_PARAMETERS, DEFAULT_OPTION

Instance Attribute Summary

Attributes inherited from Bidu::House::Report

#json

Instance Method Summary collapse

Methods inherited from Bidu::House::Report

#initialize, #status

Constructor Details

This class inherits a constructor from Bidu::House::Report

Instance Method Details

#as_jsonObject



2
3
4
5
6
# File 'lib/bidu/house/report/multiple.rb', line 2

def as_json
  {
    status: status
  }.merge(sub_reports_hash)
end

#error?Boolean

Returns:

  • (Boolean)


8
9
10
# File 'lib/bidu/house/report/multiple.rb', line 8

def error?
  sub_reports.any?(&:error?)
end