class PullRequest
  OPEN_ACTION = "opened".freeze
  SYNC_ACTION = "synchronize".freeze

  def initialize(github_payload)
    self.github_payload = github_payload
  end

  def opened?
    github_payload.action == OPEN_ACTION
  end

  def synchronize?
    github_payload.action == SYNC_ACTION
  end

  private

  attr_accessor :github_payload
end

# frozen_string_literal: true

class PullRequest
  OPEN_ACTION = "opened"
  SYNC_ACTION = "synchronize"

  def initialize(github_payload)
    self.github_payload = github_payload
  end

  def opened?
    github_payload.action == OPEN_ACTION
  end

  def synchronize?
    github_payload.action == SYNC_ACTION
  end

  private

  attr_accessor :github_payload
end

Update frozen strings in PullRequest
Update frozen strings in PullRequest

frozen_string_literal is more efficient and a step towards immutable
strings in future versions of Ruby.
