<commit_before>//
//  DLInputControlNode.swift
//  NodeExtension
//
//  Created by <NAME> on 25/08/2017.
//  Copyright (c) 2017 <NAME>. All rights reserved.
//

import AsyncDisplayKit

open class DLInputControlNode: DLViewNode<DLInputControlButton> {

    private let _actionBlock: (_ sender: UIView) -> Void
    
    public init(inputView: UIView, inputAccessoryView: UIView? = nil, action: @escaping (_ sender: UIView) -> Void) {
        _actionBlock = action
        super.init()
        
        self.setViewBlock { () -> UIView in
            return DLInputControlButton(inputView: inputView, inputAccessoryView: inputAccessoryView)
        }
    }
    
    override open func didLoad() {
        super.didLoad()
        
        self.nodeView.addTarget(self, action: #selector(touchAction), for: .touchUpInside)
    }
    
    @objc private func touchAction() {
        self.nodeView.becomeFirstResponder()
        
        _actionBlock(self.nodeView)
    }
}<commit_msg>Add init function with block parameters for DLInputControlNode<commit_after>//
//  DLInputControlNode.swift
//  NodeExtension
//
//  Created by <NAME> on 25/08/2017.
//  Copyright (c) 2017 <NAME>. All rights reserved.
//

import AsyncDisplayKit

open class DLInputControlNode: DLViewNode<DLInputControlButton> {

    private let _actionBlock: (_ sender: UIView) -> Void
    
    public init(inputView: UIView, inputAccessoryView: UIView? = nil, action: @escaping (_ sender: UIView) -> Void) {
        _actionBlock = action
        super.init()
        
        self.setViewBlock { () -> UIView in
            return DLInputControlButton(inputView: inputView, inputAccessoryView: inputAccessoryView)
        }
    }
    
    public init(inputViewBlock: @escaping () -> UIView, inputAccessoryViewBlock: (() -> UIView?)? = nil, action: @escaping (_ sender: UIView) -> Void) {
        _actionBlock = action
        super.init()
        
        self.setViewBlock { () -> UIView in
            return DLInputControlButton(inputView: inputViewBlock(), inputAccessoryView: inputAccessoryViewBlock?())
        }
    }
    
    override open func didLoad() {
        super.didLoad()
        
        self.nodeView.addTarget(self, action: #selector(touchAction), for: .touchUpInside)
    }
    
    @objc private func touchAction() {
        self.nodeView.becomeFirstResponder()
        
        _actionBlock(self.nodeView)
    }
}
{'fraction_non_alphanumeric': 0.10758965804837364, 'fraction_numerical': 0.010008340283569641, 'mean_word_length': 2.6184012066365008, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 19, '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': '2362560', 'n_tokens_mistral': 737, 'n_tokens_neox': 698, 'n_words': 160}