Class: Danger::Changelog::ChangelogCheckResult

Inherits:
Object
  • Object
show all
Defined in:
lib/danger/plugins/changelog.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(errors: [], warnings: [], markdowns: [], messages: []) ⇒ ChangelogCheckResult

Returns a new instance of ChangelogCheckResult.



60
61
62
63
64
65
# File 'lib/danger/plugins/changelog.rb', line 60

def initialize(errors: [], warnings: [], markdowns: [], messages: [])
  @errors = errors
  @warnings = warnings
  @markdowns = markdowns
  @messages = messages
end

Instance Attribute Details

#errorsObject (readonly)

Returns the value of attribute errors.



58
59
60
# File 'lib/danger/plugins/changelog.rb', line 58

def errors
  @errors
end

#markdownsObject (readonly)

Returns the value of attribute markdowns.



58
59
60
# File 'lib/danger/plugins/changelog.rb', line 58

def markdowns
  @markdowns
end

#messagesObject (readonly)

Returns the value of attribute messages.



58
59
60
# File 'lib/danger/plugins/changelog.rb', line 58

def messages
  @messages
end

#warningsObject (readonly)

Returns the value of attribute warnings.



58
59
60
# File 'lib/danger/plugins/changelog.rb', line 58

def warnings
  @warnings
end

Class Method Details

.emptyObject



69
70
71
# File 'lib/danger/plugins/changelog.rb', line 69

def self.empty
  new
end

.error(error) ⇒ Object



73
74
75
# File 'lib/danger/plugins/changelog.rb', line 73

def self.error(error)
  new(errors: [error])
end

.warning(warning) ⇒ Object



77
78
79
# File 'lib/danger/plugins/changelog.rb', line 77

def self.warning(warning)
  new(warnings: [warning])
end

Instance Method Details

#error(error) ⇒ Object



81
82
83
# File 'lib/danger/plugins/changelog.rb', line 81

def error(error)
  errors << error
end

#markdown(markdown) ⇒ Object



89
90
91
# File 'lib/danger/plugins/changelog.rb', line 89

def markdown(markdown)
  markdowns << markdown
end

#message(message) ⇒ Object



93
94
95
# File 'lib/danger/plugins/changelog.rb', line 93

def message(message)
  messages << message
end

#warning(warning) ⇒ Object



85
86
87
# File 'lib/danger/plugins/changelog.rb', line 85

def warning(warning)
  warnings << warning
end