Class: Rafflesia::AnnotationMapRequest

Inherits:
Types::BaseModel
  • Object
show all
Defined in:
lib/rafflesia/annotations/annotation_map_request.rb

Constant Summary collapse

HASH_ATTRS =
{
  allow_network: :allow_network,
  from_id: :from_id,
  sources: :sources,
  to_ref: :to_ref
}.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json) ⇒ AnnotationMapRequest

Returns a new instance of AnnotationMapRequest.



21
22
23
24
25
26
27
28
# File 'lib/rafflesia/annotations/annotation_map_request.rb', line 21

def initialize(json)
  super()
  hash = self.class.normalize(json)
  @allow_network = hash[:allow_network]
  @from_id = hash[:from_id]
  @sources = (hash[:sources] || [])
  @to_ref = hash[:to_ref]
end

Instance Attribute Details

#allow_networkObject

Returns the value of attribute allow_network.



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

def allow_network
  @allow_network
end

#from_idObject

Returns the value of attribute from_id.



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

def from_id
  @from_id
end

#sourcesObject

Returns the value of attribute sources.



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

def sources
  @sources
end

#to_refObject

Returns the value of attribute to_ref.



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

def to_ref
  @to_ref
end