Passed
Push — master ( 52f960...2ac20a )
by Javier
02:29
created

src/voting_url.js   A

Size

Lines of Code 16

Duplication

Duplicated Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
nc 1
dl 0
loc 16
rs 10
noi 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