Class: IIIF::Presentation::Resource

Inherits:
AbstractResource show all
Defined in:
lib/iiif/presentation/resource.rb

Direct Known Subclasses

ImageResource

Constant Summary

Constants included from HashBehaviours

HashBehaviours::SIMPLE_SELF_RETURNERS

Instance Method Summary collapse

Methods inherited from AbstractResource

#abstract_resource_only_keys, #any_type_keys, #array_only_keys, #hash_only_keys, #int_only_keys, #legal_viewing_direction_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_keysObject



7
8
9
# File 'lib/iiif/presentation/resource.rb', line 7

def required_keys
  %w{ @id }
end

#string_only_keysObject



11
12
13
# File 'lib/iiif/presentation/resource.rb', line 11

def string_only_keys
  super + %w{ format }
end