Public Instance methods

Calculates the set of unambiguous abbreviations for the strings in self. If passed a pattern or a string, only the strings matching the pattern or starting with the string are considered.

  %w{ car cone }.abbrev   #=> { "ca" => "car", "car" => "car",
                                "co" => "cone", "con" => cone",
                                "cone" => "cone" }

[Source]

    # File abbrev.rb, line 90
90:   def abbrev(pattern = nil)
91:     Abbrev::abbrev(self, pattern)
92:   end

[Source]

18:   def dclone
19:     klone = self.clone
20:     klone.clear
21:     self.each{|v| klone << v.dclone}
22:     klone
23:   end

[Source]

     # File pp.rb, line 287
287:   def pretty_print(q)
288:     q.group(1, '[', ']') {
289:       q.seplist(self) {|v|
290:         q.pp v
291:       }
292:     }
293:   end

[Source]

     # File pp.rb, line 295
295:   def pretty_print_cycle(q)
296:     q.text(empty? ? '[]' : '[...]')
297:   end

[Source]

     # File mkmf.rb, line 135
135:   def quote
136:     map {|s| s.quote}
137:   end

[Source]

     # File yaml/rubytypes.rb, line 106
106:         def to_yaml( opts = {} )
107:                 YAML::quick_emit( object_id, opts ) do |out|
108:             out.seq( taguri, to_yaml_style ) do |seq|
109:                 each do |x|
110:                     seq.add( x )
111:                 end
112:             end
113:         end
114:         end

[Source]

     # File yaml/rubytypes.rb, line 105
105:     def yaml_initialize( tag, val ); concat( val.to_a ); end

Search

Google

Ruby API Docs

Links