Class: LinkedRails::Resource

Inherits:
Object
  • Object
show all
Includes:
ActiveModel::Attributes, ActiveModel::Model, Model
Defined in:
app/models/linked_rails/resource.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Model

#build_child, #singular_resource?

Methods included from Model::Serialization

#preview_includes, #show_includes

Methods included from Model::Iri

#anonymous_iri, #iri, #iri_opts, #rdf_type, #reload, #root_relative_iri, #route_fragment

Methods included from Model::Enhancements

#enhanced_with?

Methods included from Model::Dirty

#previous_changes_by_predicate, #previously_changed_relations

Methods included from Model::Collections

#collection_for, #parent_collections

Instance Attribute Details

#iri=(value) ⇒ Object (writeonly)

Sets the attribute iri

Parameters:

  • value

    the value to set the attribute iri to.



10
11
12
# File 'app/models/linked_rails/resource.rb', line 10

def iri=(value)
  @iri = value
end

Instance Method Details

#anonymous_iri?Boolean

Returns:

  • (Boolean)


13
14
15
# File 'app/models/linked_rails/resource.rb', line 13

def anonymous_iri?
  @iri.blank?
end