Class: LockDiff::Github::Content

Inherits:
Object
  • Object
show all
Extended by:
Forwardable
Defined in:
lib/lock_diff/github/content.rb

Overview

wrapper of Github Content

Constant Summary collapse

CHANGE_LOG_CANDIDATES =
%w[
  changelog
  changes
  history
  releases
  releasenote
  news
].freeze

Instance Method Summary collapse

Constructor Details

#initialize(content) ⇒ Content

Returns a new instance of Content.



18
19
20
# File 'lib/lock_diff/github/content.rb', line 18

def initialize(content)
  @content = content
end

Instance Method Details

#change_log?Boolean

Returns:

  • (Boolean)


22
23
24
25
26
# File 'lib/lock_diff/github/content.rb', line 22

def change_log?
  file? && CHANGE_LOG_CANDIDATES.any? do |candidate|
    normalized_name.start_with?(candidate)
  end
end