Module: SDL::Types::SDLType
- Included in:
- SDLBoolean, SDLDescription, SDLDuration, SDLMoney, SDLNumber, SDLSimpleType, SDLString, SDLTime, SDLUrl
- Defined in:
- lib/sdl/types/sdl_type.rb,
lib/sdl/exporters/xml_mapping.rb
Overview
An SDLType is a wrapper around a basic Ruby type
Defined Under Namespace
Modules: ClassMethods
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.codes ⇒ Object
8 9 10 |
# File 'lib/sdl/types/sdl_type.rb', line 8 def self.codes @codes ||= {} end |
.included(base) ⇒ Object
4 5 6 |
# File 'lib/sdl/types/sdl_type.rb', line 4 def self.included(base) base.extend ClassMethods end |
Instance Method Details
#xml_attributes ⇒ Object
46 47 48 49 50 51 52 53 54 55 56 57 58 |
# File 'lib/sdl/exporters/xml_mapping.rb', line 46 def xml_attributes attributes = {} if respond_to?(:identifier) && identifier attributes['identifier'] = identifier end unless annotations.blank? attributes['annotation'] = annotations.first end attributes end |
#xml_value ⇒ Object
42 43 44 |
# File 'lib/sdl/exporters/xml_mapping.rb', line 42 def xml_value self end |