class Yields
Describes a block parameter.
@yields {|person| ... } If a block is given.
Should contain nested parameters.
Definitions
def self.build(directive, match)
Build a yields tag from a directive and match.
Signature
-
parameter
directive
String
The directive name.
-
parameter
match
MatchData
The regex match data.
Implementation
def self.build(directive, match)
node = self.new(directive, match[:block])
if details = match[:details]
node.add(Text.new(details))
end
return node
end
def initialize(directive, block)
Initialize a new yields tag.
Signature
-
parameter
directive
String
The directive name.
-
parameter
block
String
The block signature.
Implementation
def initialize(directive, block)
super(directive)
@block = block
end