Class: Rafflesia::AnnotationFetchRequest
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- Rafflesia::AnnotationFetchRequest
- Defined in:
- lib/rafflesia/annotations/annotation_fetch_request.rb
Constant Summary collapse
- HASH_ATTRS =
{ allow_network: :allow_network, ids: :ids, sources: :sources, target_id: :target_id }.freeze
Instance Attribute Summary collapse
-
#allow_network ⇒ Object
Returns the value of attribute allow_network.
-
#ids ⇒ Object
Returns the value of attribute ids.
-
#sources ⇒ Object
Returns the value of attribute sources.
-
#target_id ⇒ Object
Returns the value of attribute target_id.
Instance Method Summary collapse
-
#initialize(json) ⇒ AnnotationFetchRequest
constructor
A new instance of AnnotationFetchRequest.
Constructor Details
#initialize(json) ⇒ AnnotationFetchRequest
Returns a new instance of AnnotationFetchRequest.
21 22 23 24 25 26 27 28 |
# File 'lib/rafflesia/annotations/annotation_fetch_request.rb', line 21 def initialize(json) super() hash = self.class.normalize(json) @allow_network = hash[:allow_network] @ids = (hash[:ids] || []) @sources = (hash[:sources] || []) @target_id = hash[:target_id] end |
Instance Attribute Details
#allow_network ⇒ Object
Returns the value of attribute allow_network.
15 16 17 |
# File 'lib/rafflesia/annotations/annotation_fetch_request.rb', line 15 def allow_network @allow_network end |
#ids ⇒ Object
Returns the value of attribute ids.
15 16 17 |
# File 'lib/rafflesia/annotations/annotation_fetch_request.rb', line 15 def ids @ids end |
#sources ⇒ Object
Returns the value of attribute sources.
15 16 17 |
# File 'lib/rafflesia/annotations/annotation_fetch_request.rb', line 15 def sources @sources end |
#target_id ⇒ Object
Returns the value of attribute target_id.
15 16 17 |
# File 'lib/rafflesia/annotations/annotation_fetch_request.rb', line 15 def target_id @target_id end |