Class: BibframeRuby::Contribution

Inherits:
Resource
  • Object
show all
Defined in:
lib/bibframe_ruby/models/contribution.rb

Overview

Represents a BIBFRAME Contribution — an agent's role in creating a resource.

Instance Attribute Summary

Attributes inherited from Resource

#id, #properties, #rdf_graph, #types

Instance Method Summary collapse

Methods inherited from Resource

#[], #[]=, #initialize, #to_rdf

Constructor Details

This class inherits a constructor from BibframeRuby::Resource

Instance Method Details

#agent ⇒ Object



7
8
9
# File 'lib/bibframe_ruby/models/contribution.rb', line 7

def agent
  self["agent"]
end

#primary? ⇒ Boolean

Returns:

  • (Boolean)


15
16
17
# File 'lib/bibframe_ruby/models/contribution.rb', line 15

def primary?
  self["primary"] == true
end

#role ⇒ Object



11
12
13
# File 'lib/bibframe_ruby/models/contribution.rb', line 11

def role
  self["role"]
end