Class: Bidu::House::Report
- Inherits:
-
Object
- Object
- Bidu::House::Report
- Includes:
- JsonParser
- Defined in:
- lib/bidu/house/report.rb,
lib/bidu/house/report/error.rb,
lib/bidu/house/report/range.rb
Direct Known Subclasses
Defined Under Namespace
Modules: Multiple Classes: ActiveRecord, Error, Range
Constant Summary collapse
- ALLOWED_PARAMETERS =
[]
- DEFAULT_OPTION =
{}
Instance Attribute Summary collapse
-
#json ⇒ Object
readonly
Returns the value of attribute json.
Instance Method Summary collapse
- #as_json ⇒ Object
- #error? ⇒ Boolean
-
#initialize(options = {}) ⇒ Report
constructor
A new instance of Report.
- #status ⇒ Object
Constructor Details
#initialize(options = {}) ⇒ Report
Returns a new instance of Report.
16 17 18 |
# File 'lib/bidu/house/report.rb', line 16 def initialize( = {}) @json = default_option.merge() end |
Instance Attribute Details
#json ⇒ Object (readonly)
Returns the value of attribute json.
12 13 14 |
# File 'lib/bidu/house/report.rb', line 12 def json @json end |
Instance Method Details
#as_json ⇒ Object
28 29 30 |
# File 'lib/bidu/house/report.rb', line 28 def as_json { status: status } end |
#error? ⇒ Boolean
24 25 26 |
# File 'lib/bidu/house/report.rb', line 24 def error? raise 'Not implemented yet' end |
#status ⇒ Object
20 21 22 |
# File 'lib/bidu/house/report.rb', line 20 def status @status ||= error? ? :error : :ok end |