<commit_before>//
//  Npc.swift
//  Camira
//
//  Created by <NAME> on 18/05/2015.
//  Copyright (c) 2015 <NAME>. All rights reserved.
//

import Foundation
import Gloss

public class Npc: Object, Glossy {
    var alive = true
    
    func kill () {
        self.alive = false
    }
    
    func revive () {
        self.alive = true
    }
    
    public required init?(json: JSON) {
        guard
            let id: String = "id" <~~ json
        else { return nil }
        
        if let alive: Bool = "alive" <~~ json {
            self.alive = alive
        }
    }
    
    public func toJSON() -> JSON? {
        return jsonify([
            "id" ~~> id,
            "alive" ~~> alive
        ])
    }
}<commit_msg>Remove redundante calls to self<commit_after>//
//  Npc.swift
//  Camira
//
//  Created by <NAME> on 18/05/2015.
//  Copyright (c) 2015 <NAME>. All rights reserved.
//

import Foundation
import Gloss

public class Npc: Object, Glossy {
    var alive = true
    
    func kill () {
        alive = false
    }
    
    func revive () {
        alive = true
    }
    
    public required init?(json: JSON) {
        guard
            let id: String = "id" <~~ json
        else { return nil }
        
        if let alive: Bool = "alive" <~~ json {
            self.alive = alive
        }
    }
    
    public func toJSON() -> JSON? {
        return jsonify([
            "id" ~~> id,
            "alive" ~~> alive
        ])
    }
}
{'fraction_non_alphanumeric': 0.12722298221614228, 'fraction_numerical': 0.016415868673050615, 'mean_word_length': 1.3788617886178862, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 13, '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': '5180516', 'n_tokens_mistral': 493, 'n_tokens_neox': 472, 'n_words': 136}