class Ahnnotate::Function::Format

Attributes

comment[R]

Public Class Methods

new(comment:) click to toggle source
# File lib/ahnnotate/function/format.rb, line 6
def initialize(comment:)
  @comment = comment
end

Public Instance Methods

call(table, content) click to toggle source
# File lib/ahnnotate/function/format.rb, line 10
def call(table, content)
  table.string(comment: comment) + "\n" + strip_schema(content)
end

Private Instance Methods

strip_schema(content) click to toggle source
# File lib/ahnnotate/function/format.rb, line 16
def strip_schema(content)
  @schema_stripper ||= StripSchema.new(comment: comment)

  @schema_stripper.call(content)
end