Class: WSDSL::Documentation::ElementDoc
- Inherits:
-
Object
- Object
- WSDSL::Documentation::ElementDoc
- Defined in:
- lib/documentation.rb
Overview
This class contains the documentation information regarding an element. Currently, elements are only used in the response info.
Instance Attribute Summary collapse
- #attributes ⇒ Object readonly
- #name ⇒ Object readonly
Instance Method Summary collapse
- #attribute(name, desc) ⇒ Object
-
#initialize(name) ⇒ ElementDoc
constructor
A new instance of ElementDoc.
Constructor Details
#initialize(name) ⇒ ElementDoc
Returns a new instance of ElementDoc.
33 34 35 36 37 |
# File 'lib/documentation.rb', line 33 def initialize(name) # raise ArgumentError, "An Element doc needs to be initialize by passing a hash with a ':name' keyed entry." unless opts.is_a?(Hash) && opts.has_key?(:name) @name = name @attributes = {} end |
Instance Attribute Details
#attributes ⇒ Object (readonly)
29 30 31 |
# File 'lib/documentation.rb', line 29 def attributes @attributes end |
#name ⇒ Object (readonly)
29 30 31 |
# File 'lib/documentation.rb', line 29 def name @name end |
Instance Method Details
#attribute(name, desc) ⇒ Object
42 43 44 |
# File 'lib/documentation.rb', line 42 def attribute(name, desc) @attributes[name] = desc end |