Class: IIIF::Presentation::Layer
- Inherits:
-
AbstractResource
- Object
- Service
- AbstractResource
- IIIF::Presentation::Layer
- Defined in:
- lib/iiif/presentation/layer.rb
Constant Summary collapse
- TYPE =
'sc:Layer'
Constants included from HashBehaviours
HashBehaviours::SIMPLE_SELF_RETURNERS
Instance Method Summary collapse
- #array_only_keys ⇒ Object
-
#initialize(hsh = {}) ⇒ Layer
constructor
A new instance of Layer.
- #required_keys ⇒ Object
- #string_only_keys ⇒ Object
- #validate ⇒ Object
Methods inherited from AbstractResource
#abstract_resource_only_keys, #any_type_keys, #hash_only_keys, #int_only_keys, #legal_viewing_direction_values, #legal_viewing_hint_values, #to_ordered_hash
Methods inherited from Service
#abstract_resource_only_keys, #any_type_keys, from_ordered_hash, #hash_only_keys, #int_only_keys, parse, #to_json, #to_ordered_hash
Methods included from HashBehaviours
#clear, #merge, #merge!, #reject!, #select, #select!
Constructor Details
Instance Method Details
#array_only_keys ⇒ Object
13 14 15 |
# File 'lib/iiif/presentation/layer.rb', line 13 def array_only_keys super + %w{ other_content } end |
#required_keys ⇒ Object
9 10 11 |
# File 'lib/iiif/presentation/layer.rb', line 9 def required_keys super + %w{ @id label } end |
#string_only_keys ⇒ Object
17 18 19 |
# File 'lib/iiif/presentation/layer.rb', line 17 def string_only_keys super + %w{ viewing_direction } # should any of the any_type_keys be here? end |
#validate ⇒ Object
26 27 28 29 30 |
# File 'lib/iiif/presentation/layer.rb', line 26 def validate # Must all members of otherContent and images must be a URI (string), or # can they be inline? super end |