Module: RD::ComplexListItem

### Home Classes Methods

### In Files

- lib/rd/complex-list-item.rb

### Methods

- #assign_term
- #children
- #each
- #each_block
- #each_block_in_description
- #each_element
- #inspect
- #label
- #make_term
- #set_term
- #set_term_under_document_struct
- #set_term_without_document_struct
- #term=
- #to_label

### Files

- post-install

### Class/Module Index

Quicksearch

- RD
- RD::AutoLabel
- RD::BlockElement
- RD::Code
- RD::ComplexListItem
- RD::DescList
- RD::DescListItem
- RD::DescListItem::Term
- RD::DocumentElement
- RD::DocumentStructure
- RD::Element
- RD::ElementRelationship
- RD::Emphasis
- RD::EnumList
- RD::EnumListItem
- RD::Filter
- RD::Filter::FileInclude
- RD::Footnote
- RD::Headline
- RD::Include
- RD::Index
- RD::InlineElement
- RD::InlineIncludable
- RD::ItemList
- RD::ItemListItem
- RD::Keyboard
- RD::LabelComposable
- RD::LabeledElement
- RD::List
- RD::ListItem
- RD::ListItemComposable
- RD::MethodList
- RD::MethodListItem
- RD::MethodListItem::Term
- RD::MethodParse
- RD::NonterminalElement
- RD::NonterminalInline
- RD::OutputFormatVisitor
- RD::ParserUtility
- RD::Part
- RD::RBLFile
- RD::RBLSuite
- RD::RD2HTMLExtVisitor
- RD::RD2HTMLExtVisitor::EnableBr
- RD::RD2HTMLExtVisitor::HeadElement
- RD::RD2HTMLExtVisitor::HeadLineTitle
- RD::RD2HTMLExtVisitor::HeadlineSecno
- RD::RD2HTMLExtVisitor::NativeInline
- RD::RD2HTMLExtVisitor::RefExtension
- RD::RD2HTMLVisitor
- RD::RD2MANVisitor
- RD::RD2RDOVisitor
- RD::RD2RMIVisitor
- RD::RDElement
- RD::RDInlineParser
- RD::RDParser
- RD::RDTree
- RD::RDVisitor
- RD::Reference
- RD::Reference::Label
- RD::Reference::RDLabel
- RD::Reference::TemporaryLabel
- RD::Reference::URL
- RD::ReferenceResolver
- RD::SearchFile
- RD::StringElement
- RD::TerminalElement
- RD::TerminalInline
- RD::TextBlock
- RD::Tree
- RD::Var
- RD::Verb
- RD::Verbatim
- RD::Version
- RD::Visitor
- Array

No matching classes.

# RD::ComplexListItem

abstruct class for ListItem which have term part additionaly. (i.e. DescListItem and MethodListItem)

### Public Instance Methods

assign_term(term) click to toggle source

    # File lib/rd/complex-list-item.rb, line 21
    def assign_term(term)
      @term = term
      term.parent = self
    end

children() click to toggle source

    # File lib/rd/complex-list-item.rb, line 49
    def children
      @description
    end

each(&block) click to toggle source
Alias for: each_element
each_block() click to toggle source
Alias for: each_block_in_description
each_block_in_description() click to toggle source

    # File lib/rd/complex-list-item.rb, line 42
    def each_block_in_description
      @description.each do |i|
        yield(i)
      end
    end

Also aliased as: each_block
each_element(&block) click to toggle source

    # File lib/rd/complex-list-item.rb, line 33
    def each_element(&block)
      yield(self)
      @term.each_element(&block)
      @description.each do |i|
        i.each_element(&block)
      end
    end

Also aliased as: each
inspect() click to toggle source

    # File lib/rd/complex-list-item.rb, line 58
    def inspect
      t = indent2(term.inspect) if term
      c  = children.collect{|i| indent2(i.inspect)}.join("\n")
      "<#{self.class.name}>" + (term ? "\n" : "") + t.to_s +
        (c.empty? ? "" : "\n") + c
    end

label() click to toggle source
Alias for: to_label
make_term(*args_of_new, &block) click to toggle source

    # File lib/rd/complex-list-item.rb, line 26
    def make_term(*args_of_new, &block)
      child = self.class::Term.new(*args_of_new)
      set_term(child)
      child.build(&block) if block_given?
      child
    end

set_term(term) click to toggle source

    # File lib/rd/complex-list-item.rb, line 7
    def set_term(term)
      set_term_under_document_struct(term, tree.document_struct)
    end

Also aliased as: term=
set_term_under_document_struct(term, document_struct) click to toggle source

    # File lib/rd/complex-list-item.rb, line 12
    def set_term_under_document_struct(term, document_struct)
      raise ArgumentError unless document_struct.is_valid?(self, term)
      assign_term(term)
    end

set_term_without_document_struct(term) click to toggle source

    # File lib/rd/complex-list-item.rb, line 17
    def set_term_without_document_struct(term)
      assign_term(term)
    end

term=(term) click to toggle source
Alias for: set_term
to_label() click to toggle source

    # File lib/rd/complex-list-item.rb, line 53
    def to_label
      @term.to_label
    end

Also aliased as: label

[Validate]

Generated with the Darkfish Rdoc Generator 2.