Class: RDoc::Generator::Mdoc::Attribute

Inherits:
Object
  • Object
show all
Defined in:
lib/rdoc/generator/mdoc/attribute.rb

Instance Method Summary collapse

Constructor Details

#initialize(rdoc_attribute) ⇒ Attribute

Returns a new instance of Attribute.



5
6
7
# File 'lib/rdoc/generator/mdoc/attribute.rb', line 5

def initialize(rdoc_attribute)
  @rdoc_attribute = rdoc_attribute
end

Instance Method Details

#described?Boolean

Returns:

  • (Boolean)


17
18
19
# File 'lib/rdoc/generator/mdoc/attribute.rb', line 17

def described?
  !description.empty?
end

#descriptionObject



21
22
23
# File 'lib/rdoc/generator/mdoc/attribute.rb', line 21

def description
  comment.mdoc_formatted_content
end

#nameObject



9
10
11
# File 'lib/rdoc/generator/mdoc/attribute.rb', line 9

def name
  rdoc_attribute.name
end

#rwObject



13
14
15
# File 'lib/rdoc/generator/mdoc/attribute.rb', line 13

def rw
  rdoc_attribute.rw
end