From 4873a9122d777873fdaff404bdaaa42ac6ed2f8b Mon Sep 17 00:00:00 2001 From: Reed Es Date: Tue, 14 Mar 2023 16:59:25 -0600 Subject: [PATCH] expanding visibility of properties and methods --- Sources/NumPadBase.swift | 14 +++++++------- Sources/NumPadFloat.swift | 6 +++--- Sources/NumPadInt.swift | 4 ++-- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/Sources/NumPadBase.swift b/Sources/NumPadBase.swift index f7d2222..59221ff 100644 --- a/Sources/NumPadBase.swift +++ b/Sources/NumPadBase.swift @@ -53,11 +53,11 @@ public enum NumPad: Int { } open class NumPadBase: ObservableObject { - var stringValue: String { "" } - var value: T? { nil } - var isClear: Bool { false } - func clearAction() {} - func digitAction(_: NumPad) -> Bool { false } - func backspaceAction() {} - func decimalPointAction() -> Bool { false } + public var stringValue: String { "" } + public var value: T? { nil } + public var isClear: Bool { false } + public func clearAction() {} + public func digitAction(_: NumPad) -> Bool { false } + public func backspaceAction() {} + public func decimalPointAction() -> Bool { false } } diff --git a/Sources/NumPadFloat.swift b/Sources/NumPadFloat.swift index 8f05b5c..776edb4 100644 --- a/Sources/NumPadFloat.swift +++ b/Sources/NumPadFloat.swift @@ -25,9 +25,9 @@ public final class NumPadFloat: NumPadBase // MARK: - parameters @Published private(set) var sValue: String - internal let precision: Int + public let precision: Int internal let formatter: NumberFormatter - internal let upperBound: T + public let upperBound: T public init(_ dvalue: T, precision: Int = NumPad.defaultPrecision, @@ -63,7 +63,7 @@ public final class NumPadFloat: NumPadBase toValue(sValue) } - override var isClear: Bool { + override public var isClear: Bool { sValue == "0" } diff --git a/Sources/NumPadInt.swift b/Sources/NumPadInt.swift index fe55b21..47a6018 100644 --- a/Sources/NumPadInt.swift +++ b/Sources/NumPadInt.swift @@ -26,7 +26,7 @@ public final class NumPadInt: NumPadBase @Published private(set) var sValue: String internal let formatter: NumberFormatter - internal let upperBound: T + public let upperBound: T public init(_ iValue: T, upperBound: T = T.max) @@ -60,7 +60,7 @@ public final class NumPadInt: NumPadBase toValue(sValue) } - override var isClear: Bool { + override public var isClear: Bool { sValue == "0" }