def self.generate_required_data(orders)
      all_the_orders = []
      orders.each do |order|
...

Ruby Building an array from data...

by juo100@gmail.com, December 05, 2011 02:36, 4 refactorings, tagged with shorten

Just interested to see how ...

B543a43dc8cb0aae562278484db60d25 Talk
class User
  attr_writer :opts
  def opts
...

Ruby Refactor simple attr_reader

by Ryguy, April 28, 2011 22:52, 7 refactorings, tagged with shorten, aesthetic

Shortest, most aesthetic wa...

Ba665f86f90a1982af7b9c857418fcdb Talk
def parse_url(url)
  matches = url.match(/\/([\d]{10})/)
  return nil unless matches
...

Ruby Return nil if nothing matched

by Fu86, June 19, 2010 10:16, 3 refactorings, tagged with regular expression, shorten

I want to return nil if not...

Ee0505bbd355292778077fb662c88f13 Talk