Skip to content

Commit

Permalink
Improved access policy
Browse files Browse the repository at this point in the history
  • Loading branch information
lukaskubanek committed Nov 20, 2014
1 parent 0816ca1 commit 8ae99b9
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions Sources/LoremSwiftum.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,30 +15,30 @@ import UIKit

// MARK: - Utilities

func randomNumber(max: Int) -> Int {
private func randomNumber(max: Int) -> Int {
return randomNumber(min: 0, max: max)
}

func randomNumber(max: UInt) -> UInt {
private func randomNumber(max: UInt) -> UInt {
return randomNumber(min: 0, max: max)
}

func randomNumber(#min: Int, #max: Int) -> Int {
private func randomNumber(#min: Int, #max: Int) -> Int {
return min + Int(arc4random_uniform(UInt32(max - min)))
}

func randomNumber(#min: UInt, #max: UInt) -> UInt {
private func randomNumber(#min: UInt, #max: UInt) -> UInt {
return UInt(randomNumber(min: Int(min), max: Int(max)))
}

extension Array {
func randomElement() -> T {
private func randomElement() -> T {
return self[randomNumber(self.count)]
}
}

extension String {
func stringByCapitalizingFirstLetter() -> String {
private func stringByCapitalizingFirstLetter() -> String {
let startIndex = self.startIndex
let endIndex = self.startIndex.successor()
let capitalizedFirstLetter = self.substringToIndex(advance(startIndex, 1)).capitalizedString
Expand Down Expand Up @@ -209,8 +209,8 @@ extension Lorem {
// MARK: - Private API

extension Lorem {
typealias Generator = (Void -> String)
typealias Decorator = (String -> String)
private typealias Generator = (Void -> String)
private typealias Decorator = (String -> String)

private class func compose(generator: Generator, _ count: UInt, middleSeparator: String, endSeparator: String = "", decorator: Decorator = { $0 }) -> String {
var result = ""
Expand Down

0 comments on commit 8ae99b9

Please sign in to comment.