Class: LinkedRails::MediaObject
- Defined in:
- app/models/linked_rails/media_object.rb
Instance Attribute Summary collapse
-
#content_type ⇒ Object
Returns the value of attribute content_type.
-
#description ⇒ Object
Returns the value of attribute description.
-
#filename ⇒ Object
Returns the value of attribute filename.
-
#position_y ⇒ Object
Returns the value of attribute position_y.
- #type ⇒ Object
-
#uploaded_at ⇒ Object
Returns the value of attribute uploaded_at.
Attributes inherited from Resource
Instance Method Summary collapse
Methods inherited from Resource
Methods included from Model
#build_child, #singular_resource?
Methods included from LinkedRails::Model::Serialization
#preview_includes, #show_includes
Methods included from LinkedRails::Model::Iri
#anonymous_iri, #anonymous_iri?, #iri, #iri_opts, #reload, #root_relative_iri, #route_fragment
Methods included from LinkedRails::Model::Enhancements
Methods included from LinkedRails::Model::Dirty
#previous_changes_by_predicate, #previously_changed_relations
Methods included from LinkedRails::Model::Collections
#collection_for, #parent_collections
Instance Attribute Details
#content_type ⇒ Object
Returns the value of attribute content_type.
5 6 7 |
# File 'app/models/linked_rails/media_object.rb', line 5 def content_type @content_type end |
#description ⇒ Object
Returns the value of attribute description.
5 6 7 |
# File 'app/models/linked_rails/media_object.rb', line 5 def description @description end |
#filename ⇒ Object
Returns the value of attribute filename.
5 6 7 |
# File 'app/models/linked_rails/media_object.rb', line 5 def filename @filename end |
#position_y ⇒ Object
Returns the value of attribute position_y.
5 6 7 |
# File 'app/models/linked_rails/media_object.rb', line 5 def position_y @position_y end |
#type ⇒ Object
27 28 29 |
# File 'app/models/linked_rails/media_object.rb', line 27 def type @type ||= content_type&.split('/')&.first end |
#uploaded_at ⇒ Object
Returns the value of attribute uploaded_at.
5 6 7 |
# File 'app/models/linked_rails/media_object.rb', line 5 def uploaded_at @uploaded_at end |
Instance Method Details
#rdf_type ⇒ Object
16 17 18 19 20 21 22 23 24 25 |
# File 'app/models/linked_rails/media_object.rb', line 16 def rdf_type case type&.to_sym when :image Vocab.schema.ImageObject when :video Vocab.schema.VideoObject else Vocab.schema.MediaObject end end |