Module: SDL::Types::SDLType::ClassMethods

Defined in:
lib/sdl/types/sdl_type.rb,
lib/sdl/exporters/xml_mapping.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#codes(*symbols) ⇒ Object (readonly)

Registers the codes symbols to be used to refer to this type



13
14
15
# File 'lib/sdl/types/sdl_type.rb', line 13

def codes
  @codes
end

#wrapped_typeObject (readonly)

The Ruby type, which is to be wrapped



10
11
12
# File 'lib/sdl/types/sdl_type.rb', line 10

def wrapped_type
  @wrapped_type
end

Instance Method Details

#wraps(type) ⇒ Object

Sets the wrapped Ruby type



17
18
19
# File 'lib/sdl/types/sdl_type.rb', line 17

def wraps(type)
  @wrapped_type = type
end

#xml_typeObject



37
38
39
40
41
42
43
# File 'lib/sdl/exporters/xml_mapping.rb', line 37

def xml_type
  if self < SDL::Base::Type
    wrapped_type.xsd_type_name
  else
    'ns:string'
  end
end