Sha256: 540b946a2b1b4bc91a013de9232049aa68bfb6c3f1e5668ba48e7f1553333aa7

Contents?: true

Size: 937 Bytes

Versions: 30

Compression:

Stored size: 937 Bytes

Contents

require 'rd/block-element'
require 'rd/element'

module RD
  class List < BlockElement
    include NonterminalElement
    attr_reader :items
    
    def initialize
      @items = []
    end
    
    alias each_item each_child
  
    def children
      @items
    end
  end
  
  class ListItem < BlockElement
    include NonterminalElement
    
    attr_reader :content
    
    def initialize
      @content = []
    end
    
    alias each_block each_child
    
    def children
      @content
    end
  end
  
  class ItemList < List
    def accept(visitor)
      visitor.visit_ItemList(self)
    end
  end
  class ItemListItem < ListItem
    def accept(visitor)
      visitor.visit_ItemListItem(self)
    end
  end
  
  class EnumList < List
    def accept(visitor)
      visitor.visit_EnumList(self)
    end
  end
  class EnumListItem < ListItem
    def accept(visitor)
      visitor.visit_EnumListItem(self)
    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/list.rb
tdiary-5.0.8 vendor/bundle/gems/rdtool-0.6.38/lib/rd/list.rb
tdiary-5.0.5 vendor/bundle/gems/rdtool-0.6.38/lib/rd/list.rb
tdiary-5.0.5 vendor/bundle/gems/tdiary-5.0.4/vendor/bundle/gems/rdtool-0.6.38/lib/rd/list.rb
tdiary-5.0.4 vendor/bundle/gems/rdtool-0.6.38/lib/rd/list.rb
tdiary-4.2.1 vendor/bundle/ruby/2.2.0/gems/rdtool-0.6.38/lib/rd/list.rb
nishidayuya-rd2odt-0.1.1.20090701.01 lib/rd2odt/rdtool/rd/list.rb
nishidayuya-rd2odt-0.1.1.20090704.01 lib/rd2odt/rdtool/rd/list.rb
nishidayuya-rd2odt-0.1.1.20090706.01 lib/rd2odt/rdtool/rd/list.rb
nishidayuya-rd2odt-0.1.1 lib/rd2odt/rdtool/rd/list.rb
tdiary-3.2.2.20130518 vendor/rdtool-0.6.38/lib/rd/list.rb
tdiary-3.2.2.20130508 vendor/rdtool-0.6.38/lib/rd/list.rb
tdiary-3.2.2.20130507 vendor/rdtool-0.6.38/lib/rd/list.rb
rdtool-0.6.38 lib/rd/list.rb
rdtool-0.6.37 lib/rd/list.rb
rdtool-0.6.36 lib/rd/list.rb
rdtool-0.6.35 lib/rd/list.rb
rdtool-0.6.34 lib/rd/list.rb
rdtool-0.6.33 lib/rd/list.rb
rdtool-0.6.32 lib/rd/list.rb