lib/decode/comment/pragma.rb in decode-0.16.0 vs lib/decode/comment/pragma.rb in decode-0.17.0
- old
+ new
@@ -28,16 +28,18 @@
# - `@deprecated Please use {other_method} instead.`
# - `@blocking This method may block.`
# - `@asynchronous This method may yield.`
#
class Pragma < Tag
- PATTERN = /\A(?<details>.*?)?\Z/
+ def self.parse(directive, text, lines, tags, level = 0)
+ self.build(directive, text)
+ end
- def self.build(directive, match)
+ def self.build(directive, text)
node = self.new(directive)
- if details = match[:details]
- node.add(Text.new(details))
+ if text
+ node.add(Text.new(text))
end
return node
end