Class: Decode::Comment::Yields
- Defined in:
- lib/decode/comment/yields.rb
Overview
Describes a block parameter.
-
‘@yields {|person| … } If a block is given.`
Should contain nested parameters.
Constant Summary collapse
- PATTERN =
/\A(?<block>{.*?})(\s+(?<details>.*?))?\Z/
Instance Attribute Summary collapse
-
#block ⇒ Object
readonly
Returns the value of attribute block.
Attributes inherited from Tag
Attributes inherited from Node
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(directive, block) ⇒ Yields
constructor
A new instance of Yields.
Methods inherited from Tag
Methods inherited from Node
#add, #children?, #each, #filter, #text, #traverse
Constructor Details
#initialize(directive, block) ⇒ Yields
Returns a new instance of Yields.
28 29 30 31 32 |
# File 'lib/decode/comment/yields.rb', line 28 def initialize(directive, block) super(directive) @block = block end |
Instance Attribute Details
#block ⇒ Object (readonly)
Returns the value of attribute block.
34 35 36 |
# File 'lib/decode/comment/yields.rb', line 34 def block @block end |