Class: Rng::DatatypeDeclaration

Inherits:
Object
  • Object
show all
Defined in:
lib/rng/datatype_declaration.rb

Overview

Represents a datatype library declaration in RNC

Example: datatypes xsd = “www.w3.org/2001/XMLSchema-datatypes

Examples:

Creating a datatype declaration

decl = DatatypeDeclaration.new(
  prefix: "xsd",
  uri: "http://www.w3.org/2001/XMLSchema-datatypes"
)

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(prefix:, uri:) ⇒ DatatypeDeclaration

Initialize a datatype library declaration

Parameters:

  • prefix (String)

    Datatype library prefix

  • uri (String)

    Datatype library URI



21
22
23
24
# File 'lib/rng/datatype_declaration.rb', line 21

def initialize(prefix:, uri:)
  @prefix = prefix
  @uri = uri
end

Instance Attribute Details

#prefixObject (readonly)

Returns the value of attribute prefix.



15
16
17
# File 'lib/rng/datatype_declaration.rb', line 15

def prefix
  @prefix
end

#uriObject (readonly)

Returns the value of attribute uri.



15
16
17
# File 'lib/rng/datatype_declaration.rb', line 15

def uri
  @uri
end