def some_method(format, language)
  raise Error unless %w(wiki xml).include?(format.to_s)
  raise Error unless %w(de en).include?(language.to_s)
...

Ruby Check for bounds

by Fu86, July 19, 2011 02:35, 2 refactorings, tagged with ruby, method, params, bounding

I need to check the given i...

Ee0505bbd355292778077fb662c88f13 Talk
def isSyncronized(self):
        NO_SYNC = 1
        UNDER_DATE = 2
...

Python nested if blocks

by marcosvanetta, July 25, 2010 01:28, 3 refactorings, tagged with python, method, metaprogramming

I wanna know if anyone can ...

55502f40dc8b7c769880b10874abc9d0 Talk
def squarebutton(name, options = {}, html_options = nil)
...

Ruby Adding default html option ...

by Michael Filbin, February 26, 2008 20:39, 3 refactorings, tagged with method, ActionView, UrlHelper, link_to

I have css directives for s...

14b8667b3bdf64068647b96c26001e0d Talk
def test_destroy_category_with_dependent
    category = Category.find(3)

...

Ruby managable test method

by we4tech, November 21, 2007 09:13, 5 refactorings, tagged with test, ruby, test case, method, unit test

in my test case method, i w...

4bb774de244da2d6e7f39a189b905077 Talk