Module: PubliSci::Prov::Element
Instance Method Summary
collapse
#add_custom, #custom, #has
Methods included from Vocabulary
#vocabulary
Instance Method Details
#__label ⇒ Object
31
32
33
34
|
# File 'lib/publisci/metadata/prov/element.rb', line 31
def __label
raise "MissingInternalLabel: no __label for #{self.inspect}" unless @__label
@__label
end
|
#__label=(l) ⇒ Object
27
28
29
|
# File 'lib/publisci/metadata/prov/element.rb', line 27
def __label=(l)
@__label = l
end
|
#subject(s = nil) ⇒ Object
7
8
9
10
11
12
13
14
15
16
17
|
# File 'lib/publisci/metadata/prov/element.rb', line 7
def subject(s=nil)
if s
if s.is_a? Symbol
raise "subject generation from symbol not yet implemented!"
else
@subject = s
end
else
@subject ||= generate_subject
end
end
|
#subject=(s) ⇒ Object
19
20
21
|
# File 'lib/publisci/metadata/prov/element.rb', line 19
def subject=(s)
@subject = s
end
|
#subject_id ⇒ Object
23
24
25
|
# File 'lib/publisci/metadata/prov/element.rb', line 23
def subject_id
self.class.to_s.split('::').last.downcase
end
|