Class: Cocoadex::Function

Inherits:
SequentialNodeElement show all
Defined in:
lib/cocoadex/models/function.rb

Direct Known Subclasses

Callback

Constant Summary collapse

TEMPLATE_NAME =
:method

Constants inherited from SequentialNodeElement

SequentialNodeElement::Abstract, SequentialNodeElement::Availability, SequentialNodeElement::Declaration, SequentialNodeElement::DeclaredIn, SequentialNodeElement::Discussion, SequentialNodeElement::ReturnValue, SequentialNodeElement::Special

Instance Attribute Summary collapse

Attributes inherited from Element

#name

Instance Method Summary collapse

Methods inherited from SequentialNodeElement

#initialize, #origin, #parse

Methods inherited from Element

#<=>, #origin, #parse_parameters, #print, #to_s

Methods included from Bri::Templates::Helpers

h3, inline_title, wrap

Constructor Details

This class inherits a constructor from Cocoadex::SequentialNodeElement

Instance Attribute Details

#abstractObject (readonly)

Returns the value of attribute abstract.



4
5
6
# File 'lib/cocoadex/models/function.rb', line 4

def abstract
  @abstract
end

#availabilityObject (readonly)

Returns the value of attribute availability.



4
5
6
# File 'lib/cocoadex/models/function.rb', line 4

def availability
  @availability
end

#declarationObject (readonly)

Returns the value of attribute declaration.



4
5
6
# File 'lib/cocoadex/models/function.rb', line 4

def declaration
  @declaration
end

#declared_inObject (readonly)

Returns the value of attribute declared_in.



4
5
6
# File 'lib/cocoadex/models/function.rb', line 4

def declared_in
  @declared_in
end

#return_valueObject (readonly)

Returns the value of attribute return_value.



4
5
6
# File 'lib/cocoadex/models/function.rb', line 4

def return_value
  @return_value
end

Instance Method Details

#discussionObject



12
13
14
# File 'lib/cocoadex/models/function.rb', line 12

def discussion
  ""
end

#handle_node(node) ⇒ Object



16
17
18
19
20
21
22
# File 'lib/cocoadex/models/function.rb', line 16

def handle_node node
  if node.classes.include? "parameters"
    parse_parameters(node)
  else
    logger.debug("Unhandled function property: #{node.classes} => #{node.text}")
  end
end

#parametersObject



8
9
10
# File 'lib/cocoadex/models/function.rb', line 8

def parameters
  @parameters ||= []
end

#typeObject



24
25
26
# File 'lib/cocoadex/models/function.rb', line 24

def type
  "Function"
end