Class: LinkedRails::EntryPoint
- Inherits:
-
Object
- Object
- LinkedRails::EntryPoint
- Includes:
- ActiveModel::Model, Model
- Defined in:
- app/models/linked_rails/entry_point.rb
Constant Summary
Constants included from Model::Collections
Model::Collections::COLLECTION_CUSTOMIZABLE_OPTIONS, Model::Collections::COLLECTION_OPTIONS, Model::Collections::COLLECTION_STATIC_OPTIONS
Instance Attribute Summary collapse
-
#parent ⇒ Object
Returns the value of attribute parent.
- #target_url ⇒ Object
Class Method Summary collapse
Instance Method Summary collapse
Methods included from Model
Methods included from Model::Singularable
#root_relative_iri, #root_relative_singular_iri, #singular_iri, #singular_iri_opts, #singular_iri_template, #singular_resource?
Methods included from Model::Serialization
#preview_includes, #show_includes
Methods included from Model::Menuable
Methods included from Model::Iri
#anonymous_iri, #anonymous_iri?, #iri, #iri_elements, #iri_opts, #rdf_type, #reload, #root_relative_iri
Methods included from Model::Enhancements
Methods included from Model::Dirty
#previous_changes_by_predicate, #previously_changed_relations
Methods included from Model::Collections
#collection_for, #collection_iri, #collection_options_for, #collection_root_relative_iri, #parent_collections
Methods included from Model::Actionable
#action, #action_list, #action_triples, #actions, #collection_actions, #favorite_actions
Instance Attribute Details
#parent ⇒ Object
Returns the value of attribute parent.
8 9 10 |
# File 'app/models/linked_rails/entry_point.rb', line 8 def parent @parent end |
#target_url ⇒ Object
36 37 38 |
# File 'app/models/linked_rails/entry_point.rb', line 36 def target_url @target_url || parent.target_url end |
Class Method Details
.iri ⇒ Object
51 52 53 |
# File 'app/models/linked_rails/entry_point.rb', line 51 def iri Vocab.schema.EntryPoint end |
Instance Method Details
#action_body ⇒ Object
13 14 15 16 17 |
# File 'app/models/linked_rails/entry_point.rb', line 13 def action_body return form if form.is_a?(RDF::URI) form&.form_iri end |
#as_json(**_opts) ⇒ Object
19 20 21 |
# File 'app/models/linked_rails/entry_point.rb', line 19 def as_json(**_opts) {} end |
#iri_template ⇒ Object
23 24 25 26 27 28 |
# File 'app/models/linked_rails/entry_point.rb', line 23 def iri_template @iri_template ||= iri_template_with_fragment( LinkedRails::URITemplate.new(parent.root_relative_iri.to_s), :EntryPoint ) end |
#label ⇒ Object
30 31 32 33 34 |
# File 'app/models/linked_rails/entry_point.rb', line 30 def label var = parent.submit_label value = var.respond_to?(:call) ? parent.list.instance_exec(&var) : var value || label_fallback end |