timocratic (owner)

Fork Of

Revisions

gist: 140362 Download_button fork
public
Public Clone URL: git://gist.github.com/140362.git
Embed All Files: show embed
maybe.rb #
1
2
3
4
5
6
7
8
9
10
11
12
def funky_foo(shakalaka, &block)
  unless some_condition
    puts "chicken dinner"
    return
  end
  
  # lines of code
  # and more lines of code
  # ...
  # 50 lines of code
end
 
noooo.rb #
1
2
3
4
5
6
7
8
9
10
11
def funky_foo(shakalaka, &block)
  if some_condition
    # lines of code
    # and more lines of code
    # ...
    # 50 lines of code
  else
    puts "chicken dinner"
  end
end
 
yes!!!.rb #
1
2
3
4
5
6
7
8
9
10
11
12
13
14
def funky_foo(shakalaka, &block)
  if some_condition
    prepare_vegan_food
  else
    puts chicken dinner
  end
end
 
def prepare_vegan_food
  # lines of code
  # and more lines of code
  # ...
  # 50 lines of code
end