<commit_before>// ==========================================================================
// Project:   SproutCore - JavaScript Application Framework
// Copyright: ©2006-2011 Strobe Inc. and contributors.
//            Portions ©2008-2011 Apple Inc. All rights reserved.
// License:   Licensed under MIT license (see license.js)
// ==========================================================================

var get = SC.get, set = SC.set;

/*
  TODO Document SC.RenderBuffer class itself
*/

/**
  @class
  @extends SC.Object
*/
SC.RenderBuffer = function(tagName) {
  return SC._RenderBuffer.create({
    elementTag: tagName
  });
};

SC._RenderBuffer = SC.Object.extend(
/** @scope SC.RenderBuffer.prototype */ {

  /**
    @type Array
    @default []
  */
  elementClasses: null,

  /**
    @type String
    @default null
  */
  elementId: null,

  /**
    @type Hash
    @default {}
  */
  elementAttributes: null,

  /**
    @type Array
    @default []
  */
  elementContent: null,

  /**
    @type String
    @default null
  */
  elementTag: null,

  /**
    @type Hash
    @default {}
  */
  elementStyle: null,

  /**
    RenderBuffer supports plugging in escaping functionality via
    the boolean `escapeContent` property and the `escapeFunction`
    property.

    If `escapeContent` is set to true, the RenderBuffer will escape
    the value of the `elementContent` property when `string()` is
    called using `escapeFunction`, passing in the content.

    @type Boolean
  */
  escapeContent: false,

  /**
    @type Function
    @see SC.RenderBuffer.prototype.escapeContent
  */
  escapeFunction: null,

  parentBuffer: null,<commit_msg>Add documentation for render buffer<commit_after>// ==========================================================================
// Project:   SproutCore - JavaScript Application Framework
// Copyright: ©2006-2011 Strobe Inc. and contributors.
//            Portions ©2008-2011 Apple Inc. All rights reserved.
// License:   Licensed under MIT license (see license.js)
// ==========================================================================

var get = SC.get, set = SC.set;

/**
  @class

  SC.RenderBuffer gathers information regarding the a view and generates the 
  final representation. SC.RenderBuffer will generate HTML which can be pushed
  to the DOM.

  @extends SC.Object
*/
SC.RenderBuffer = function(tagName) {
  return SC._RenderBuffer.create({
    elementTag: tagName
  });
};

SC._RenderBuffer = SC.Object.extend(
/** @scope SC.RenderBuffer.prototype */ {

  /**
    Array of class-names which will be applied in the class="" attribute

    You should not maintain this array yourself, rather, you should use
    the addClass() method of SC.RenderBuffer.
    
    @type Array
    @default []
  */
  elementClasses: null,

  /**
    The id in of the element, to be applied in the id="" attribute

    You should not set this property yourself, rather, you should use
    the id() method of SC.RenderBuffer.
    
    @type String
    @default null
  */
  elementId: null,

  /**
    A hash keyed on the name of the attribute and whose value will be 
    applied to that attribute. For example, if you wanted to apply a 
    data-view="Foo.bar" property to an element, you would set the 
    elementAttributes hash to {'data-view':'Foo.bar'}

    You should not maintain this hash yourself, rather, you should use
    the attr() method of SC.RenderBuffer.
    
    @type Hash
    @default {}
  */
  elementAttributes: null,

  /**
    An array of strings which defines the body of the element.

    You should not maintain this array yourself, rather, you should use
    the push() method of SC.RenderBuffer.

    @type Array
    @default []
  */
  elementContent: null,

  /**
    The tagname of the element an instance of SC.RenderBuffer represents.
    
    Usually, this gets set as the first parameter to SC.RenderBuffer. For
    example, if you wanted to create a `p` tag, then you would call
    
      SC.RenderBuffer('p')  

    @type String
    @default null
  */
  elementTag: null,

  /**
    A hash keyed on the name of the style attribute and whose value will 
    be applied to that attribute. For example, if you wanted to apply a 
    background-color:black;" style to an element, you would set the 
    elementStyle hash to {'background-color':'black'}

    You should not maintain this hash yourself, rather, you should use
    the style() method of SC.RenderBuffer.

    @type Hash
    @default {}
  */
  elementStyle: null,

  /**
    RenderBuffer supports plugging in escaping functionality via
    the boolean `escapeContent` property and the `escapeFunction`
    property.

    If `escapeContent` is set to true, the RenderBuffer will escape
    the value of the `elementContent` property when `string()` is
    called using `escapeFunction`, passing in the content.

    @type Boolean
  */
  escapeContent: false,

  /**
    If escapeContent is set to true, escapeFunction will be called
    to escape the content. Set this property to a function that
    takes a content string as its parameter, and return a sanitized
    string.
    
    @type Function
    @see SC.RenderBuffer.prototype.escapeContent
  */
  escapeFunction: null,

  /**
    Nested RenderBuffers will set this to their parent RenderBuffer
    instance.
 
    @type SC._RenderBuffer
  */
  parentBuffer: null,
{'fraction_non_alphanumeric': 0.13995905453191884, 'fraction_numerical': 0.00595570444816676, 'mean_word_length': 3.0074571215510812, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '7244915', 'n_tokens_mistral': 1493, 'n_tokens_neox': 1405, 'n_words': 563}