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