Class: Rafflesia::AnnotationFetchRequest

Inherits:
Types::BaseModel
  • Object
show all
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

Instance Method Summary collapse

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_networkObject

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

#idsObject

Returns the value of attribute ids.



15
16
17
# File 'lib/rafflesia/annotations/annotation_fetch_request.rb', line 15

def ids
  @ids
end

#sourcesObject

Returns the value of attribute sources.



15
16
17
# File 'lib/rafflesia/annotations/annotation_fetch_request.rb', line 15

def sources
  @sources
end

#target_idObject

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