Class: ODRL::Profile::Duty

Inherits:
Rule show all
Defined in:
lib/odrl/profile/builder.rb

Instance Attribute Summary

Attributes inherited from Rule

#disjoints

Attributes inherited from ProfileElement

#definition, #label, #parent_class, #parent_property, #uri

Instance Method Summary collapse

Constructor Details

#initialize(disjoints: [], **args) ⇒ Duty

Returns a new instance of Duty.



259
260
261
# File 'lib/odrl/profile/builder.rb', line 259

def initialize(disjoints: [], **args)
  super(disjoints: [ODRLV.Permission, ODRLV.Prohibition].concat(disjoints), **args)
end

Instance Method Details

#build(repo:) ⇒ Object



263
264
265
266
267
# File 'lib/odrl/profile/builder.rb', line 263

def build(repo:)
  ODRL::Profile::Builder.triplify(uri, RDFS.subClassOf, ODRLV.Duty, repo)

  super(repo: repo)
end