mirror of
https://github.com/Retrospring/retrospring.git
synced 2025-01-19 15:06:03 +01:00
15 lines
229 B
Ruby
15 lines
229 B
Ruby
|
# frozen_string_literal: true
|
||
|
|
||
|
class AnswerPolicy
|
||
|
attr_reader :user, :answer
|
||
|
|
||
|
def initialize(user, answer)
|
||
|
@user = user
|
||
|
@answer = answer
|
||
|
end
|
||
|
|
||
|
def pin? = answer.user == user
|
||
|
|
||
|
def unpin? = answer.user == user
|
||
|
end
|