Class: Shale::Schema::XMLGenerator::TypedAttribute Private

Inherits:
Attribute
  • Object
show all
Defined in:
lib/shale/schema/xml_generator/typed_attribute.rb

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Class representing XML Schema <attribute name=“” type=“”> element with a name and a type

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Attribute

#as_xml

Constructor Details

#initialize(name:, type:, default: nil) ⇒ TypedAttribute

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Initialize TypedAttribute object

Parameters:

  • name (String)
  • type (String)
  • default (String, nil) (defaults to: nil)


27
28
29
30
31
# File 'lib/shale/schema/xml_generator/typed_attribute.rb', line 27

def initialize(name:, type:, default: nil)
  super(default)
  @name = name
  @type = type
end

Instance Attribute Details

#nameString (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Return name

Returns:

  • (String)


18
19
20
# File 'lib/shale/schema/xml_generator/typed_attribute.rb', line 18

def name
  @name
end