class Danger::Markdown

Public Class Methods

new(message, file = nil, line = nil) click to toggle source
Calls superclass method Danger::BaseMessage::new
# File lib/danger/danger_core/messages/markdown.rb, line 7
def initialize(message, file = nil, line = nil)
  super(type: :markdown, message: message, file: file, line: line)
end

Public Instance Methods

<=>(other) click to toggle source
# File lib/danger/danger_core/messages/markdown.rb, line 35
def <=>(other)
  return 1 if other.type != :markdown

  compare_by_file_and_line(other)
end
==(other) click to toggle source
# File lib/danger/danger_core/messages/markdown.rb, line 11
def ==(other)
  return false if other.nil?
  return false unless other.kind_of? self.class

  other.message == message &&
    other.file == file &&
    other.line == line
end
hash() click to toggle source
# File lib/danger/danger_core/messages/markdown.rb, line 20
def hash
  h = 1
  h = h * 31 + message.hash
  h = h * 17 + file.hash
  h * 17 + line.hash
end
to_s() click to toggle source
# File lib/danger/danger_core/messages/markdown.rb, line 27
def to_s
  extra = []
  extra << "file: #{file}" unless file
  extra << "line: #{line}" unless line

  "Markdown #{message} { #{extra.join ', '} }"
end