Class: OpenApi::Xml
- Inherits:
-
Object
- Object
- OpenApi::Xml
- Defined in:
- lib/open_api/xml.rb
Overview
Instance Attribute Summary collapse
-
#attribute ⇒ Object
Returns the value of attribute attribute.
-
#name ⇒ Object
Returns the value of attribute name.
-
#namespace ⇒ Object
Returns the value of attribute namespace.
-
#prefix ⇒ Object
Returns the value of attribute prefix.
-
#wrapped ⇒ Object
Returns the value of attribute wrapped.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(name: nil, namespace: nil, prefix: nil, attribute: false, wrapped: false) ⇒ Xml
constructor
A new instance of Xml.
Constructor Details
#initialize(name: nil, namespace: nil, prefix: nil, attribute: false, wrapped: false) ⇒ Xml
Returns a new instance of Xml.
6 7 8 9 10 11 12 |
# File 'lib/open_api/xml.rb', line 6 def initialize(name: nil, namespace: nil, prefix: nil, attribute: false, wrapped: false) self.name = name self.namespace = namespace self.prefix = prefix self.attribute = attribute self.wrapped = wrapped end |
Instance Attribute Details
#attribute ⇒ Object
Returns the value of attribute attribute.
4 5 6 |
# File 'lib/open_api/xml.rb', line 4 def attribute @attribute end |
#name ⇒ Object
Returns the value of attribute name.
4 5 6 |
# File 'lib/open_api/xml.rb', line 4 def name @name end |
#namespace ⇒ Object
Returns the value of attribute namespace.
4 5 6 |
# File 'lib/open_api/xml.rb', line 4 def namespace @namespace end |
#prefix ⇒ Object
Returns the value of attribute prefix.
4 5 6 |
# File 'lib/open_api/xml.rb', line 4 def prefix @prefix end |
#wrapped ⇒ Object
Returns the value of attribute wrapped.
4 5 6 |
# File 'lib/open_api/xml.rb', line 4 def wrapped @wrapped end |
Class Method Details
.load(hash) ⇒ Object
14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/open_api/xml.rb', line 14 def self.load(hash) return unless hash new( name: hash["name"], namespace: hash["namespace"], prefix: hash["prefix"], attribute: hash["attribute"], wrapped: hash["wrapped"], ) end |