class Parser::Source::Comment
def self.associate(ast, comments)
def self.associate(ast, comments) associator = Associator.new(comments, ast) associator.associate end
def ==(other)
def ==(other) other.is_a?(Source::Comment) && @location == other.location end
def document?
def document? type == :document end
def initialize(location)
def initialize(location) @location = location @text = location.source.freeze freeze end
def inline?
def inline? type == :inline end
def type
def type case text when /^#/ :inline when /^=begin/ :document end end