Class: Ahnnotate::Function::StripSchema
- Inherits:
-
Object
- Object
- Ahnnotate::Function::StripSchema
- Defined in:
- lib/ahnnotate/function/strip_schema.rb
Instance Attribute Summary collapse
-
#comment ⇒ Object
readonly
Returns the value of attribute comment.
Instance Method Summary collapse
- #call(content) ⇒ Object
-
#initialize(comment:) ⇒ StripSchema
constructor
A new instance of StripSchema.
Constructor Details
#initialize(comment:) ⇒ StripSchema
Returns a new instance of StripSchema.
6 7 8 |
# File 'lib/ahnnotate/function/strip_schema.rb', line 6 def initialize(comment:) @comment = comment end |
Instance Attribute Details
#comment ⇒ Object (readonly)
Returns the value of attribute comment.
4 5 6 |
# File 'lib/ahnnotate/function/strip_schema.rb', line 4 def comment @comment end |
Instance Method Details
#call(content) ⇒ Object
10 11 12 13 14 15 16 17 18 |
# File 'lib/ahnnotate/function/strip_schema.rb', line 10 def call(content) matches = pattern.match(content) if matches matches["post"] else content end end |