Class: Shale::Schema::XMLGenerator::TypedElement Private
- Defined in:
- lib/shale/schema/xml_generator/typed_element.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
Instance Attribute Summary collapse
-
#name ⇒ String
readonly
private
Return name.
Instance Method Summary collapse
-
#attributes ⇒ Hash
private
Return attributes as Ruby Hash.
-
#initialize(name:, type:, default: nil, collection: false, required: false) ⇒ TypedElement
constructor
private
Initialize TypedElement object.
Methods inherited from Element
Constructor Details
#initialize(name:, type:, default: nil, collection: false, required: false) ⇒ TypedElement
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 TypedElement object
29 30 31 32 33 |
# File 'lib/shale/schema/xml_generator/typed_element.rb', line 29 def initialize(name:, type:, default: nil, collection: false, required: false) super(default, collection, required) @name = name @type = type end |
Instance Attribute Details
#name ⇒ String (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
18 19 20 |
# File 'lib/shale/schema/xml_generator/typed_element.rb', line 18 def name @name end |
Instance Method Details
#attributes ⇒ Hash
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 attributes as Ruby Hash
40 41 42 |
# File 'lib/shale/schema/xml_generator/typed_element.rb', line 40 def attributes { 'name' => @name, 'type' => @type } end |