Class: PubliSci::Prov::Role
- Inherits:
-
Object
- Object
- PubliSci::Prov::Role
- Includes:
- Element
- Defined in:
- lib/bio-publisci/metadata/prov/role.rb
Instance Method Summary collapse
Methods included from Element
#__label, #__label=, #subject, #subject=, #subject_id
Methods included from CustomPredicate
Methods included from Vocabulary
Instance Method Details
#comment(str = nil) ⇒ Object
8 9 10 11 12 13 14 |
# File 'lib/bio-publisci/metadata/prov/role.rb', line 8 def comment(str=nil) if str @comment = str else @comment end end |
#to_n3 ⇒ Object
def steps(steps=nil)
if steps
if File.exist? steps
steps = Array[IO.read(steps).split("\n")]
end
@steps = Array[steps]
else
@steps
end
end
27 28 29 30 31 32 33 |
# File 'lib/bio-publisci/metadata/prov/role.rb', line 27 def to_n3 str = "<#{subject}> a prov:Role ;\n" str << "\trdfs:comment \"#{comment}\" ;\n" if comment add_custom(str) str << "\trdfs:label \"#{__label}\" .\n\n" end |
#to_s ⇒ Object
35 36 37 |
# File 'lib/bio-publisci/metadata/prov/role.rb', line 35 def to_s subject end |