Object
# File ruby-3.1.2/lib/rubygems/util/list.rb, line 7 def initialize(value = nil, tail = nil) @value = value @tail = tail end
# File ruby-3.1.2/lib/rubygems/util/list.rb, line 32 def self.prepend(list, value) return List.new(value) unless list List.new value, list end
# File ruby-3.1.2/lib/rubygems/util/list.rb, line 12 def each n = self while n yield n.value n = n.tail end end
# File ruby-3.1.2/lib/rubygems/util/list.rb, line 24 def prepend(value) List.new value, self end
# File ruby-3.1.2/lib/rubygems/util/list.rb, line 20 def to_a super.reverse end
This page was generated for Ruby 3.1.2
Ruby-doc.org is a service of James Britt and Neurogami, purveyors of fine dance noise.
Generated with Ruby-doc Rdoc Generator 0.42.0.