Class: Rafflesia::EnvelopeSearchSegmentBuildData
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- Rafflesia::EnvelopeSearchSegmentBuildData
- Defined in:
- lib/rafflesia/sequences/envelope_search_segment_build_data.rb
Constant Summary collapse
- HASH_ATTRS =
{ data: :data, error: :error, evidence: :evidence, ok: :ok, provenance: :provenance, warnings: :warnings }.freeze
Instance Attribute Summary collapse
-
#data ⇒ Object
Returns the value of attribute data.
-
#error ⇒ Object
Returns the value of attribute error.
-
#evidence ⇒ Object
Returns the value of attribute evidence.
-
#ok ⇒ Object
Returns the value of attribute ok.
-
#provenance ⇒ Object
Returns the value of attribute provenance.
-
#warnings ⇒ Object
Returns the value of attribute warnings.
Instance Method Summary collapse
-
#initialize(json) ⇒ EnvelopeSearchSegmentBuildData
constructor
A new instance of EnvelopeSearchSegmentBuildData.
Constructor Details
#initialize(json) ⇒ EnvelopeSearchSegmentBuildData
Returns a new instance of EnvelopeSearchSegmentBuildData.
25 26 27 28 29 30 31 32 33 34 |
# File 'lib/rafflesia/sequences/envelope_search_segment_build_data.rb', line 25 def initialize(json) super() hash = self.class.normalize(json) @data = hash[:data] ? Rafflesia::SearchSegmentBuildData.new(hash[:data]) : nil @error = hash[:error] ? Rafflesia::ApiErrorBody.new(hash[:error]) : nil @evidence = hash[:evidence] ? Rafflesia::EvidenceSummary.new(hash[:evidence]) : nil @ok = hash[:ok] @provenance = hash[:provenance] ? Rafflesia::Provenance.new(hash[:provenance]) : nil @warnings = (hash[:warnings] || []).map { |item| item ? Rafflesia::SearchWarning.new(item) : nil } end |
Instance Attribute Details
#data ⇒ Object
Returns the value of attribute data.
17 18 19 |
# File 'lib/rafflesia/sequences/envelope_search_segment_build_data.rb', line 17 def data @data end |
#error ⇒ Object
Returns the value of attribute error.
17 18 19 |
# File 'lib/rafflesia/sequences/envelope_search_segment_build_data.rb', line 17 def error @error end |
#evidence ⇒ Object
Returns the value of attribute evidence.
17 18 19 |
# File 'lib/rafflesia/sequences/envelope_search_segment_build_data.rb', line 17 def evidence @evidence end |
#ok ⇒ Object
Returns the value of attribute ok.
17 18 19 |
# File 'lib/rafflesia/sequences/envelope_search_segment_build_data.rb', line 17 def ok @ok end |
#provenance ⇒ Object
Returns the value of attribute provenance.
17 18 19 |
# File 'lib/rafflesia/sequences/envelope_search_segment_build_data.rb', line 17 def provenance @provenance end |
#warnings ⇒ Object
Returns the value of attribute warnings.
17 18 19 |
# File 'lib/rafflesia/sequences/envelope_search_segment_build_data.rb', line 17 def warnings @warnings end |