RSDFraction

struct RSDFraction
  • Declaration

    Swift

    public init(stringLiteral value: String)
  • String representation of the fractional value

    Declaration

    Swift

    public var stringValue: String
  • Declaration

    Swift

    public init(floatLiteral value: Double)
  • Double value for the fraction

    Declaration

    Swift

    public var doubleValue: Double
  • Declaration

    Swift

    public var hashValue: Int
  • Declaration

    Swift

    public static func ==(lhs: RSDFraction, rhs: RSDFraction) -> Bool
  • The fraction can be decoded from either a string in the form numerator / denominator or from a number.

    Declaration

    Swift

    public init(from decoder: Decoder) throws
  • The fraction is encoded as a double value.

    Declaration

    Swift

    public func encode(to encoder: Encoder) throws
  • Declaration

    Swift

    public func jsonNumber() -> NSNumber?
  • Declaration

    Swift

    public func jsonObject() -> Any
  • Declaration

    Swift

    public var description: String