Sha256: aa03b32a43874a40e9f167b281397e9f2838a01804c53af88382bc8853cde0f1

Contents?: true

Size: 770 Bytes

Versions: 10

Compression:

Stored size: 770 Bytes

Contents

//
//  RubyCommandable.swift
//  FastlaneRunner
//
//  Created by Joshua Liebowitz on 1/4/18.
//  Copyright © 2018 Joshua Liebowitz. All rights reserved.
//

import Foundation

enum CommandType {
    case action
    case control

    var token: String {
        switch self {
        case .action:
            return "action"
        case .control:
            return "control"
        }
    }
}

protocol RubyCommandable {
    var type: CommandType { get }
    var commandJson: String { get }
}

extension RubyCommandable {
    var json: String {
        return "{\"commandType\" : \"\(self.type.token)\", \"command\" : \(self.commandJson)}"
    }
}

// Please don't remove the lines below
// They are used to detect outdated files
// FastlaneRunnerAPIVersion [0.9.2]

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
fastlane-2.76.0.beta.20180111010004 fastlane/swift/RubyCommandable.swift
fastlane-2.76.0.beta.20180110010004 fastlane/swift/RubyCommandable.swift
fastlane-2.75.1 fastlane/swift/RubyCommandable.swift
fastlane-2.75.0 fastlane/swift/RubyCommandable.swift
fastlane-2.75.0.beta.20180109010003 fastlane/swift/RubyCommandable.swift
fastlane-2.74.1 fastlane/swift/RubyCommandable.swift
fastlane-2.74.0 fastlane/swift/RubyCommandable.swift
fastlane-2.74.0.beta.20180108010004 fastlane/swift/RubyCommandable.swift
fastlane-2.74.0.beta.20180107010004 fastlane/swift/RubyCommandable.swift
fastlane-2.74.0.beta.20180106010004 fastlane/swift/RubyCommandable.swift