Cross Reference: repository_serializer.rb
xref
: /
ontohub
/
app
/
serializers
/
repository_serializer.rb
Home
History
Annotate
Line#
Navigate
Download
Search
only in
./
class
RepositorySerializer
<
ApplicationSerializer
class
Reference
<
ApplicationSerializer
attributes
:
iri
attributes
:
name
def
iri
urls.repository
_url
(
object
,
host
:
Ontohub
::
Application.config.fqdn
,
port
:
Ontohub
::
Application.config.port
)
end
end
attributes
:
iri
, :
remote_origin
, :
source
attributes
:
name
, :
path
, :
description
def
iri
Reference.new
(
object
)
.
iri
end
def
remote_origin
object.mirror
? ||
object.fork
?
end
def
source
if
remote_origin
{
type
:
object.remote
_type
,
source_type
:
object.source
_type
,
state
:
object.state
,
address
:
object.source
_address
}
end
end
end