<commit_before>###
@TODO

@namespace Atoms.COre
@class Output

@author <NAME> <<EMAIL>> || @soyjavi
###
"use strict"

Atoms.Core.Output =

  method: "append"

  append: -> @render "append"

  prepend: -> @render "prepend"

  html: -> @render "html"

  render: ->
    throw "No template defined." unless @template?
    throw "No parent assigned." unless @attributes.parent?

    @el = Atoms.$ Atoms.Core.render(@template)(@attributes)
    @parent = Atoms.$ @attributes.parent
    @method = @attributes.method if @attributes.method?
    @parent[@method] @el<commit_msg>Set special "if" bindings in Output module<commit_after>###
@TODO

@namespace Atoms.COre
@class Output

@author <NAME> <<EMAIL>> || @soyjavi
###
"use strict"

Atoms.Core.Output =

  method: "append"
  ifs   : []

  append: -> @render "append"

  prepend: -> @render "prepend"

  html: -> @render "html"

  render: ->
    throw "No template defined." unless @template?
    throw "No parent assigned." unless @attributes.parent?

    @_setIfBindings() if @ifs.length > 0
    @el = Atoms.$ Atoms.Core.render(@template)(@attributes)
    @parent = Atoms.$ @attributes.parent
    @method = @attributes.method if @attributes.method?
    @parent[@method] @el

  _setIfBindings: ->
    @attributes.if = {}
    for key in @ifs
      @attributes.if[key] = if @attributes[key]? then true else false
{'fraction_non_alphanumeric': 0.1589061345158906, 'fraction_numerical': 0.0007390983000739098, 'mean_word_length': 3.558922558922559, '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': '3276319', 'n_tokens_mistral': 462, 'n_tokens_neox': 445, 'n_words': 121}