Sha256: fd044449962209c627eb390352685fc500fc2885a46368fffb5146bddfabcd35

Contents?: true

Size: 1003 Bytes

Versions: 30

Compression:

Stored size: 1003 Bytes

Contents

require 'rd/element'
require 'rd/list'
require 'rd/complex-list-item'
require 'rd/labeled-element'

module RD
  class MethodList < List
    def accept(visitor)
      visitor.visit_MethodList(self)
    end
  end
  
  class MethodListItem < ListItem
    include ComplexListItem
    
    attr_reader :term
    attr_reader :description
    
    def initialize
      @term = nil
      @description = []
    end
    
    def accept(visitor)
      visitor.visit_MethodListItem(self)
    end
    
    def children
      @description
    end

    class Term < Element
      include TerminalElement
      include LabeledElement
      
      attr_reader :content
      
      def initialize(content = "")
	@content = content
      end

      def each_element
	yield(self)
      end
      alias each each_element

      def accept(visitor)
	visitor.visit_MethodListItemTerm(self)
      end

     def calculate_label
	@content.sub(/\s*(?:\(|\{).*$/, "")
     end
     private :calculate_label
    end
  end
end # RD

Version data entries

30 entries across 29 versions & 4 rubygems

Version Path
tdiary-5.1.6 vendor/bundle/ruby/2.7.0/gems/rdtool-0.6.38/lib/rd/methodlist.rb
tdiary-5.0.8 vendor/bundle/gems/rdtool-0.6.38/lib/rd/methodlist.rb
tdiary-5.0.5 vendor/bundle/gems/rdtool-0.6.38/lib/rd/methodlist.rb
tdiary-5.0.5 vendor/bundle/gems/tdiary-5.0.4/vendor/bundle/gems/rdtool-0.6.38/lib/rd/methodlist.rb
tdiary-5.0.4 vendor/bundle/gems/rdtool-0.6.38/lib/rd/methodlist.rb
tdiary-4.2.1 vendor/bundle/ruby/2.2.0/gems/rdtool-0.6.38/lib/rd/methodlist.rb
nishidayuya-rd2odt-0.1.1.20090701.01 lib/rd2odt/rdtool/rd/methodlist.rb
nishidayuya-rd2odt-0.1.1.20090704.01 lib/rd2odt/rdtool/rd/methodlist.rb
nishidayuya-rd2odt-0.1.1.20090706.01 lib/rd2odt/rdtool/rd/methodlist.rb
nishidayuya-rd2odt-0.1.1 lib/rd2odt/rdtool/rd/methodlist.rb
tdiary-3.2.2.20130518 vendor/rdtool-0.6.38/lib/rd/methodlist.rb
tdiary-3.2.2.20130508 vendor/rdtool-0.6.38/lib/rd/methodlist.rb
tdiary-3.2.2.20130507 vendor/rdtool-0.6.38/lib/rd/methodlist.rb
rdtool-0.6.38 lib/rd/methodlist.rb
rdtool-0.6.37 lib/rd/methodlist.rb
rdtool-0.6.36 lib/rd/methodlist.rb
rdtool-0.6.35 lib/rd/methodlist.rb
rdtool-0.6.34 lib/rd/methodlist.rb
rdtool-0.6.33 lib/rd/methodlist.rb
rdtool-0.6.32 lib/rd/methodlist.rb