Class: JAXB2Ruby::Namespace

Inherits:
String
  • Object
show all
Defined in:
lib/jaxb2ruby/classes.rb

Overview

:nodoc:

Constant Summary collapse

@@prefixes =
Hash.new { |h,ns|  h[ns] = "ns#{counter+=1}".freeze }

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name) ⇒ Namespace

Returns a new instance of Namespace.



37
38
39
40
41
# File 'lib/jaxb2ruby/classes.rb', line 37

def initialize(name)
  @name   = name
  @prefix = @@prefixes[name]
  super
end

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



34
35
36
# File 'lib/jaxb2ruby/classes.rb', line 34

def name
  @name
end

#prefixObject (readonly)

Returns the value of attribute prefix.



35
36
37
# File 'lib/jaxb2ruby/classes.rb', line 35

def prefix
  @prefix
end