Class: RDoc::Generator::Mdoc::Module
- Inherits:
-
Object
- Object
- RDoc::Generator::Mdoc::Module
- Defined in:
- lib/rdoc/generator/mdoc/module.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#mandb_section ⇒ Object
readonly
Returns the value of attribute mandb_section.
Instance Method Summary collapse
- #described? ⇒ Boolean
- #description ⇒ Object
- #extended_modules ⇒ Object
- #full_name ⇒ Object
- #included_modules ⇒ Object
-
#initialize(rdoc_module, mandb_section) ⇒ Module
constructor
A new instance of Module.
- #methods ⇒ Object
- #methods_by_type(section) ⇒ Object
- #reference ⇒ Object
- #sections ⇒ Object
- #short_description ⇒ Object
Constructor Details
#initialize(rdoc_module, mandb_section) ⇒ Module
Returns a new instance of Module.
10 11 12 13 |
# File 'lib/rdoc/generator/mdoc/module.rb', line 10 def initialize(rdoc_module, mandb_section) @rdoc_module = rdoc_module @mandb_section = mandb_section end |
Instance Attribute Details
#mandb_section ⇒ Object (readonly)
Returns the value of attribute mandb_section.
8 9 10 |
# File 'lib/rdoc/generator/mdoc/module.rb', line 8 def mandb_section @mandb_section end |
Instance Method Details
#described? ⇒ Boolean
27 28 29 |
# File 'lib/rdoc/generator/mdoc/module.rb', line 27 def described? !description.empty? end |
#description ⇒ Object
31 32 33 |
# File 'lib/rdoc/generator/mdoc/module.rb', line 31 def description comment.mdoc_formatted_content end |
#extended_modules ⇒ Object
35 36 37 |
# File 'lib/rdoc/generator/mdoc/module.rb', line 35 def extended_modules @extended_modules ||= decorate_rdoc_mixins(rdoc_module.extends) end |
#full_name ⇒ Object
15 16 17 |
# File 'lib/rdoc/generator/mdoc/module.rb', line 15 def full_name rdoc_module.full_name end |
#included_modules ⇒ Object
39 40 41 |
# File 'lib/rdoc/generator/mdoc/module.rb', line 39 def included_modules @included_modules ||= decorate_rdoc_mixins(rdoc_module.includes) end |
#methods ⇒ Object
43 44 45 |
# File 'lib/rdoc/generator/mdoc/module.rb', line 43 def methods sections.flat_map(&:methods) end |
#methods_by_type(section) ⇒ Object
62 63 64 |
# File 'lib/rdoc/generator/mdoc/module.rb', line 62 def methods_by_type(section) rdoc_module.methods_by_type(section) end |
#reference ⇒ Object
19 20 21 |
# File 'lib/rdoc/generator/mdoc/module.rb', line 19 def reference "#{full_name} #{mandb_section}" end |
#sections ⇒ Object
47 48 49 50 51 52 53 54 55 56 57 58 59 60 |
# File 'lib/rdoc/generator/mdoc/module.rb', line 47 def sections @sections ||= rdoc_module. each_section. map do |rdoc_section, rdoc_constants, rdoc_attributes| Section.new( rdoc_section, rdoc_constants, rdoc_attributes, mandb_section, self, ) end end |
#short_description ⇒ Object
23 24 25 |
# File 'lib/rdoc/generator/mdoc/module.rb', line 23 def short_description comment.first_paragraph.truncate(50) end |