Class: Decode::Comment::Attribute
- Defined in:
- lib/decode/comment/attribute.rb
Overview
Describes an attribute type.
-
‘@attribute [Integer] The person’s age.‘
Constant Summary collapse
- PATTERN =
/\A\[(?<type>.*?)\](\s+(?<details>.*?))?\Z/
Instance Attribute Summary collapse
-
#type ⇒ Object
readonly
The type of the attribute.
Attributes inherited from Tag
Attributes inherited from Node
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(directive, type) ⇒ Attribute
constructor
A new instance of Attribute.
Methods inherited from Tag
Methods inherited from Node
#add, #children?, #each, #text, #traverse
Constructor Details
#initialize(directive, type) ⇒ Attribute
Returns a new instance of Attribute.
42 43 44 45 46 |
# File 'lib/decode/comment/attribute.rb', line 42 def initialize(directive, type) super(directive) @type = type end |
Instance Attribute Details
#type ⇒ Object (readonly)
The type of the attribute.
50 51 52 |
# File 'lib/decode/comment/attribute.rb', line 50 def type @type end |