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
UserAccessControl uac = new UserAccessControl();

            if (uac.IsAccessable)
...

C# Setting variable in if bloc...

by Zoltran, February 02, 2011 21:29, 5 refactorings, tagged with C#, if else, shorten

How can I write a shorter

D5303b0c98c5046f64ebb02445e85809 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
#!/usr/bin/env python
import sys, os

...

Python filter by indentation level

by hayalci, September 20, 2009 12:47, 3 refactorings, tagged with filter, indent, shorten

I wrote this to filter outp...

3218c3a378d57a5af5175c4c29dbbf87 Talk