This commit is contained in:
Ivan Smolin 2018-03-26 10:56:40 +03:00
parent 7a905bb9b6
commit e3e424bdf7
2 changed files with 3 additions and 3 deletions

View File

@ -26,7 +26,7 @@ public extension NumberFormattingService {
/// Computed static property. Use only once for `formatters` field implementation!
static var computedFormatters: [NumberFormatType: NumberFormatter] {
return Dictionary(uniqueKeysWithValues: NumberFormatType.allValues.map { ($0, $0.numberFormatter) })
return Dictionary(uniqueKeysWithValues: NumberFormatType.allOptions.map { ($0, $0.numberFormatter) })
}
static func numberFormatter(for format: NumberFormatType) -> NumberFormatter {

View File

@ -25,8 +25,8 @@ import Foundation
/// Protocol for describing number format.
public protocol NumberFormat: Hashable {
/// All available options
static var allValues: [Self] { get }
/// All available options.
static var allOptions: [Self] { get }
/// A NumberFormatter instance for this format.
var numberFormatter: NumberFormatter { get }