Class: Rafflesia::AnnotationFetchData
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- Rafflesia::AnnotationFetchData
- Defined in:
- lib/rafflesia/annotations/annotation_fetch_data.rb
Constant Summary collapse
- HASH_ATTRS =
{ records: :records }.freeze
Instance Attribute Summary collapse
-
#records ⇒ Object
Returns the value of attribute records.
Instance Method Summary collapse
-
#initialize(json) ⇒ AnnotationFetchData
constructor
A new instance of AnnotationFetchData.
Constructor Details
#initialize(json) ⇒ AnnotationFetchData
Returns a new instance of AnnotationFetchData.
14 15 16 17 18 |
# File 'lib/rafflesia/annotations/annotation_fetch_data.rb', line 14 def initialize(json) super() hash = self.class.normalize(json) @records = (hash[:records] || []).map { |item| item ? Rafflesia::AnnotationRecord.new(item) : nil } end |
Instance Attribute Details
#records ⇒ Object
Returns the value of attribute records.
12 13 14 |
# File 'lib/rafflesia/annotations/annotation_fetch_data.rb', line 12 def records @records end |