Sha256: 2b343f676da1d0aa9d4fb73e8c25df839a55ba91800da79e8b6c7d115ae92fd2
Contents?: true
Size: 927 Bytes
Versions: 30
Compression:
Stored size: 927 Bytes
Contents
require 'rd/element' require 'rd/list' require 'rd/complex-list-item' require 'rd/labeled-element' module RD class DescList < List def accept(visitor) visitor.visit_DescList(self) end end class DescListItem < ListItem include ComplexListItem attr_reader :term attr_reader :description def initialize @term = nil @description = [] @label = nil end def accept(visitor) visitor.visit_DescListItem(self) end class Term < Element include NonterminalElement include LabeledElement def initialize @content = [] end def calculate_label ret = "" children.each do |i| ret.concat(i.to_label) end ret end private :calculate_label def accept(visitor) visitor.visit_DescListItemTerm(self) end def children @content end end end # DescListItem end # RD
Version data entries
30 entries across 29 versions & 4 rubygems