Skip to content

Commit

Permalink
Cleaned EverLayoutBridge class
Browse files Browse the repository at this point in the history
  • Loading branch information
dalewebster48 committed Feb 24, 2017
1 parent f24dfbb commit bf166e6
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions EverLayout/EverLayoutBridge.swift
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import SocketIO
public class EverLayoutBridge: NSObject
{
static var socket : SocketIOClient?

private static let DEFAULT_IP : String = "http://localhost"
private static let DEFAULT_PORT : String = "3000"

Expand Down Expand Up @@ -65,8 +66,7 @@ public class EverLayoutBridge: NSObject
///
/// - Parameter data: raw data
/// - Returns: JSON Data
private static func parseData (_ data : [Any]) -> JSON
{
private static func parseData (_ data : [Any]) -> JSON {
return JSON(data.first as Any)
}

Expand All @@ -75,8 +75,7 @@ public class EverLayoutBridge: NSObject
/// - Parameters:
/// - layoutName: Name of the layout that has been updated
/// - layoutData: The new layout data
private static func postLayoutUpdate (layoutName : String , layoutData : Data)
{
private static func postLayoutUpdate (layoutName : String , layoutData : Data) {
let notificationName : Notification.Name = Notification.Name("layout-update__\(layoutName)")

NotificationCenter.default.post(name: notificationName, object: layoutData)
Expand All @@ -85,10 +84,9 @@ public class EverLayoutBridge: NSObject
/// Report a message to the bridge
///
/// - Parameter message: message to report
public static func sendReport (message : String)
{
public static func sendReport (message : String) {
self.socket?.emit("report", [
"message":message
])
}
}
}

0 comments on commit bf166e6

Please sign in to comment.