Lines of Code | 16 |
Duplicated Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | class VotingUrl { |
||
2 | constructor (baseUrl, votingPoll) { |
||
3 | this.votingPoll = votingPoll |
||
4 | this.baseUrl = baseUrl |
||
5 | } |
||
6 | |||
7 | value () { |
||
8 | return `${this.baseUrl}/voting/${this.votingPoll.id}` |
||
9 | } |
||
10 | |||
11 | equalsTo (other) { |
||
12 | return other instanceof VotingUrl && this.value() === other.value() |
||
13 | } |
||
14 | } |
||
15 | |||
16 | export default VotingUrl |
||
17 |