Class: IIIF::Presentation::Resource
- Inherits:
-
AbstractResource
- Object
- Service
- AbstractResource
- IIIF::Presentation::Resource
- Defined in:
- lib/iiif/presentation/resource.rb
Direct Known Subclasses
Constant Summary
Constants included from HashBehaviours
HashBehaviours::SIMPLE_SELF_RETURNERS
Instance Method Summary collapse
-
#initialize(hsh = {}) ⇒ Resource
constructor
A new instance of Resource.
- #required_keys ⇒ Object
- #string_only_keys ⇒ Object
Methods inherited from AbstractResource
#abstract_resource_only_keys, #any_type_keys, #array_only_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, #array_only_keys, from_ordered_hash, #hash_only_keys, #int_only_keys, parse, #to_json, #to_ordered_hash, #validate
Methods included from HashBehaviours
#clear, #merge, #merge!, #reject!, #select, #select!
Constructor Details
#initialize(hsh = {}) ⇒ Resource
Returns a new instance of Resource.
15 16 17 |
# File 'lib/iiif/presentation/resource.rb', line 15 def initialize(hsh={}) super(hsh) end |
Instance Method Details
#required_keys ⇒ Object
7 8 9 |
# File 'lib/iiif/presentation/resource.rb', line 7 def required_keys %w{ @id } end |
#string_only_keys ⇒ Object
11 12 13 |
# File 'lib/iiif/presentation/resource.rb', line 11 def string_only_keys super + %w{ format } end |