The Gem::List class is currently unused and will be removed in the next major rubygems version
Instance Attribute Summary collapseReturns the value of attribute tail.
Returns the value of attribute value.
A new instance of List.
:nodoc:.
Returns a new instance of List.
9 10 11 12
# File 'lib/rubygems/util/list.rb', line 9 def initialize(value = nil, tail = nil) @value = value @tail = tail endInstance Attribute Details #tail ⇒ Object
Returns the value of attribute tail.
7 8 9
# File 'lib/rubygems/util/list.rb', line 7 def tail @tail end#value ⇒ Object
Returns the value of attribute value.
7 8 9
# File 'lib/rubygems/util/list.rb', line 7 def value @value endClass Method Details .prepend(list, value) ⇒ Object
34 35 36 37
# File 'lib/rubygems/util/list.rb', line 34 def self.prepend(list, value) return List.new(value) unless list List.new value, list endInstance Method Details #each ⇒ Object
14 15 16 17 18 19 20
# File 'lib/rubygems/util/list.rb', line 14 def each n = self while n yield n.value n = n.tail end end#prepend(value) ⇒ Object
26 27 28
# File 'lib/rubygems/util/list.rb', line 26 def prepend(value) List.new value, self end#pretty_print(q) ⇒ Object
30 31 32
# File 'lib/rubygems/util/list.rb', line 30 def pretty_print(q) q.pp to_a end#to_a ⇒ Object
22 23 24
# File 'lib/rubygems/util/list.rb', line 22 def to_a super.reverse end
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4