<commit_before>//
//  WHRoundedImageView.swift
//  WHRoundedImageView
//
//  Created by <NAME> <<EMAIL>> on 5/22/15.
//  Copyright (c) 2015 <NAME>. All rights reserved.
//

import Foundation

@IBDesignable public class WHRoundedImageView: UIImageView {
    
    
    // MARK: - Properties
    
    @IBInspectable public var radiusRatio: CGFloat = 0.5 {
        didSet {
            self.layer.cornerRadius = self.bounds.size.width * radiusRatio
        }
    }
    
    @IBInspectable public var borderWidth: CGFloat = 0.0 {
        didSet {
            self.layer.borderWidth = borderWidth
        }
    }
    
    @IBInspectable public var borderColor: UIColor = UIColor.blackColor() {
        didSet {
            self.layer.borderColor = borderColor.CGColor
        }
    }
    
    
    // MARK: - Constructors
    
    required public init(coder aDecoder: NSCoder) {
        super.init(coder: aDecoder)
        setup()
    }
    
    override public init(frame: CGRect) {
        super.init(frame: frame)
        setup()
    }
    
    override public init(image: UIImage!) {
        super.init(image: image)
        setup()
    }
    
    override public init(image: UIImage!, highlightedImage: UIImage?) {
        super.init(image: image, highlightedImage: highlightedImage)
        setup()
    }
    
    
    // MARK: - Support Methods
    
    func setup() {
        self.layer.cornerRadius = self.bounds.size.width / 2
        self.layer.masksToBounds = true
    }
    
    override public func prepareForInterfaceBuilder() {
        setup()
    }
}<commit_msg>Added Radius Ratio<commit_after>//
//  WHRoundedImageView.swift
//  WHRoundedImageView
//
//  Created by <NAME> <<EMAIL>> on 5/22/15.
//  Copyright (c) 2015 <NAME>. All rights reserved.
//

import Foundation

@IBDesignable public class WHRoundedImageView: UIImageView {
    
    
    // MARK: - Properties
    
    @IBInspectable public var radiusRatio: CGFloat = 0.5 {
        didSet {
            self.layer.cornerRadius = self.bounds.size.width * radiusRatio
        }
    }
    
    @IBInspectable public var borderWidth: CGFloat = 0.0 {
        didSet {
            self.layer.borderWidth = borderWidth
        }
    }
    
    @IBInspectable public var borderColor: UIColor = UIColor.blackColor() {
        didSet {
            self.layer.borderColor = borderColor.CGColor
        }
    }
    
    
    // MARK: - Constructors
    
    required public init(coder aDecoder: NSCoder) {
        super.init(coder: aDecoder)
        setup()
    }
    
    override public init(frame: CGRect) {
        super.init(frame: frame)
        setup()
    }
    
    override public init(image: UIImage!) {
        super.init(image: image)
        setup()
    }
    
    override public init(image: UIImage!, highlightedImage: UIImage?) {
        super.init(image: image, highlightedImage: highlightedImage)
        setup()
    }
    
    
    // MARK: - Support Methods
    
    func setup() {
        self.layer.masksToBounds = true
    }
    
    override public func prepareForInterfaceBuilder() {
        setup()
    }
}
{'fraction_non_alphanumeric': 0.10129449838187703, 'fraction_numerical': 0.008737864077669903, 'mean_word_length': 1.899624765478424, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6602735', 'n_tokens_mistral': 967, 'n_tokens_neox': 926, 'n_words': 205}