Class: OntologyUnited::DSL::OntologyImport

Inherits:
OntologyEntityBase show all
Defined in:
lib/ontology-united/dsl/ontology_import.rb

Instance Attribute Summary collapse

Attributes inherited from OntologyEntityBase

#the_calls

Instance Method Summary collapse

Methods inherited from OntologyEntityBase

delegate_equality_to, #parent

Methods included from VariableStore::Helper

#as

Constructor Details

#initialize(arg) ⇒ OntologyImport

Returns a new instance of OntologyImport.



8
9
10
11
12
# File 'lib/ontology-united/dsl/ontology_import.rb', line 8

def initialize(arg)
  @iri = arg if arg.is_a?(String)
  @ontology = arg if arg.is_a?(Ontology)
  @subject = arg
end

Instance Attribute Details

#iriObject (readonly)

Returns the value of attribute iri.



5
6
7
# File 'lib/ontology-united/dsl/ontology_import.rb', line 5

def iri
  @iri
end

#ontologyObject (readonly)

Returns the value of attribute ontology.



5
6
7
# File 'lib/ontology-united/dsl/ontology_import.rb', line 5

def ontology
  @ontology
end

#subjectObject (readonly)

Returns the value of attribute subject.



5
6
7
# File 'lib/ontology-united/dsl/ontology_import.rb', line 5

def subject
  @subject
end

Instance Method Details

#to_s(serializer: OntologyUnited::Serializer::DEFAULT.new) ⇒ Object



14
15
16
# File 'lib/ontology-united/dsl/ontology_import.rb', line 14

def to_s(serializer: OntologyUnited::Serializer::DEFAULT.new)
  serializer.serialize_import(self)
end