Class: Cocoadex::Property

Inherits:
NestedNodeElement show all
Defined in:
lib/cocoadex/models/property.rb

Overview

A Cocoa API class property

Constant Summary collapse

TEMPLATE_NAME =
:property

Instance Attribute Summary collapse

Attributes inherited from Element

#name

Instance Method Summary collapse

Methods inherited from NestedNodeElement

#parse_properties

Methods inherited from Element

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

Methods included from Bri::Templates::Helpers

h3, inline_title, wrap

Constructor Details

#initialize(parent_class, node) ⇒ Property

Returns a new instance of Property.



10
11
12
13
14
15
# File 'lib/cocoadex/models/property.rb', line 10

def initialize parent_class, node
  @parent = parent_class
  @name   = node.css("h3.method_property").first.text

  parse_properties(node)
end

Instance Attribute Details

#abstractObject (readonly)

Returns the value of attribute abstract.



7
8
9
# File 'lib/cocoadex/models/property.rb', line 7

def abstract
  @abstract
end

#availabilityObject (readonly)

Returns the value of attribute availability.



7
8
9
# File 'lib/cocoadex/models/property.rb', line 7

def availability
  @availability
end

#declarationObject (readonly)

Returns the value of attribute declaration.



7
8
9
# File 'lib/cocoadex/models/property.rb', line 7

def declaration
  @declaration
end

#discussionObject (readonly)

Returns the value of attribute discussion.



7
8
9
# File 'lib/cocoadex/models/property.rb', line 7

def discussion
  @discussion
end

#parentObject (readonly)

Returns the value of attribute parent.



7
8
9
# File 'lib/cocoadex/models/property.rb', line 7

def parent
  @parent
end

Instance Method Details

#originObject



17
18
19
# File 'lib/cocoadex/models/property.rb', line 17

def origin
  parent.to_s
end

#typeObject



21
22
23
# File 'lib/cocoadex/models/property.rb', line 21

def type
  "Property"
end