Skip to content
This repository has been archived by the owner on Dec 20, 2024. It is now read-only.

Commit

Permalink
Made State conform to Equatable protocol.
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshHrach committed Jan 23, 2017
1 parent 37f477c commit be46663
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Provincial.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

Pod::Spec.new do |s|
s.name = 'Provincial'
s.version = '0.1.1'
s.version = '0.1.2'
s.summary = 'A small library to quickly get states and provinces for various countries.'

# This description is used to generate tags and improve search results.
Expand Down
6 changes: 5 additions & 1 deletion Provincial/State.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import Foundation
/**
Contains information about an individual state.
*/
public class State {
public class State: Equatable {

/// State name
public private(set) var name: String
Expand All @@ -31,4 +31,8 @@ public class State {
self.founded = founded
self.country = country
}

public static func == (lhs: State, rhs: State) -> Bool {
return lhs.abbreviation == rhs.abbreviation && lhs.name == rhs.name && lhs.country == rhs.country
}
}

0 comments on commit be46663

Please sign in to comment.