Sha256: b9b83581ac8a069d5436555189e459d2d86bb16b7cb13a2dd94fc8c5d72b25e0
Contents?: true
Size: 733 Bytes
Versions: 63
Compression:
Stored size: 733 Bytes
Contents
module BELParser module Script # ApplyResourceURI applies the _uri_ property to # {BELParser::Parsers::AST::AnnotationDefinition} and # {BELParser::Parsers::AST::NamespaceDefinition} child nodes. class ApplyResourceURI include AST::Processor::Mixin def on_annotation_definition(node) update_uri_property(node) end def on_namespace_definition(node) update_uri_property(node) end private def update_uri_property(node) domain = node.domain if domain.url? resource_url = domain.child.string.string_literal node.uri = BELParser::Resource.resolve_uri(resource_url) end node end end end end
Version data entries
63 entries across 63 versions & 1 rubygems