class CFF::Entity
An Entity can represent different types of entities, e.g., a publishing company, or conference. Like a Person, an Entity might have a number of roles, such as author, contact, editor, etc.
Entity implements all of the fields listed in the CFF standard. All fields are simple strings and can be set as such. A field which has not been set will return the empty string. The simple fields are (with defaults in parentheses):
-
address -
alias -
city -
country -
date_end- Note: returns aDateobject -
date_start- Note: returns aDateobject -
email -
fax -
location -
name -
orcid -
post_code -
region -
tel -
website
Public Class Methods
new(name) → Entity
click to toggle source
new(name) { |entity| block } → Entity
Create a new Entity with the supplied name.
Calls superclass method
# File lib/cff/entity.rb, line 57 def initialize(param) super() if param.is_a?(Hash) @fields = param else @fields = {} @fields['name'] = param end yield self if block_given? end