Class Property

Defined in: src/nodes/property.coffee
Inherits: Node

Overview

Public: A class property that is defined by custom property set/get methods. Examples class Test get = (props) => @::__defineGetter__ name, getter for name, getter of props set = (props) => @::__defineSetter__ name, setter for name, setter of props get name: -> @name set name: (@name) ->

Examples:

class Test

get = (props) => @::__defineGetter__ name, getter for name, getter of props
set = (props) => @::__defineSetter__ name, setter for name, setter of props

get name: -> @name
set name: (@name) ->

 

Instance Method Summary

Inherited Method Summary

Methods inherited from Node

.findAncestor

Constructor Details

::constructor(entity, node, lineMapping, options, name, comment) Source

Public: Construct a new property node. entity - The property's Class node - The property node (a Object) lineMapping - An object mapping the actual position of a member to its Biscotto one options - The parser options (a Object) name - The filename (a String) comment - The comment node (a Object)

Parameters:

  • (Class) entityThe property's Class
  • (Object) nodeThe property node (a Object)
  • lineMappingAn object mapping the actual position of a member to its Biscotto one
  • (Object) optionsThe parser options (a Object)
  • (String) nameThe filename (a String)
  • (Object) commentThe comment node (a Object)

Instance Method Details

Number ::getLocation() Source

Public: Get the source line number Returns a Number.

Returns:

  • (Number) — Returns a Number.

String ::getSignature() Source

Public: Get the property signature. Returns the signature (a String)

Returns:

  • (String) — Returns the signature (a String)

Object ::toJSON() Source

Public: Get a JSON representation of the object Returns the JSON object (a Object)

Returns:

  • (Object) — Returns the JSON object (a Object)