class VotingSystem  
  #Hello, I am Rodger the old and unhappy programmer. the variable nbrOfVotes is an array of 2 dimensions. The first dimension contains the number of votes for the answer "YES, IT SUCKS"... and the other dimension contain the number of votes for the answer "NO, IT DOESN'T SUCK". In the near future there will be other possible answers... but I don't care! I retire in 2 days!
  @@nbrOfVotes = Array.new
...

Ruby Rubyize this : 6th edition

by FrankLamontagne, April 17, 2008 00:20, 8 refactorings, tagged with ruby, rubyize-this, fun

Ouch... this guy badly need...

364d0e86994a268906392f6b6146af38 Talk
# OPTIMIZE: I think we can do a LOT for optimize this.
  def create
    added_counter = 0
...

Ruby Importing large collection ...

by mister, March 22, 2008 19:16, 2 refactorings, tagged with rails, ruby

This scripts get textarea w...

D41d8cd98f00b204e9800998ecf8427e Talk
<table class="charge">
  <tr>
    <td colspan="100%" class="mainHeader"><%=@label.label%></td>
...

Ruby Iterating through a nested ...

by mwilliams, January 31, 2008 18:21, 3 refactorings, tagged with rails, ruby, Ruby on Rails, view, table, hash, nested hash, iterator, iterate

Good afternoon. I have a n...

4236ea6b84f4899b469e8edff4bf6d22 Talk
def planned_percent_complete
    if self.planned_complete_in_dollars != nil
      (( self.planned_complete_in_dollars.to_f / self.task.budget.to_f )  * 100).round(2)
...

Ruby Same methods, different Act...

by Chris W., January 08, 2008 18:31, 6 refactorings, tagged with rails, ruby, activerecord, dry

I know there has to be a "r...

D41d8cd98f00b204e9800998ecf8427e Talk
def self.find_matches(params)
    matches = self.find(:all)
...

Ruby Filtering Method Needs to b...

by bradly.myopenid.com, January 04, 2008 16:38, No refactoring, tagged with rails, ruby, filtering, wet

I know it looks long, but i...

0914e5093f1af95df0ab2478818856d8 Talk
def filename
  self.uri.split('/').last
...

C# Get the Filename segment o...

by jwmittag, January 01, 2008 15:04, 11 refactorings, tagged with Comparison, Scott Porad, asp.net, DotNET, .net, C-Sharp, CSharp, C#, RoR, Ruby on Rails, rails, ruby

On his Blog "Progress vs. P...

89f45d140c5d9b14fd63720ea8b0cb47 Talk
module Enumerable
  def to_a(n = nil)
    result = []
...

Ruby Enumerable#to_a with termin...

by Ben Kudria, December 24, 2007 23:36, No refactoring, tagged with ruby, enumerable, finite, countable, countability

Please see this ruby-talk t...

5b6484445948ebe063c264a1015dfcc4 Talk
#!/usr/bin/ruby -w

status, *cmd = ARGV
...

Ruby script for subversion statu...

by philippe.rathe.myopenid.com, December 17, 2007 19:01, 2 refactorings, tagged with ruby, subversion, svn, tools

For those who work with sub...

701f4a931bb6873408ffd3311aaf9457 Talk
require 'find'
excludes = [".svn", "lib", "modules", "feathers"]
exclude_files = []
...

Ruby Crawl a directory and searc...

by Alex Suraci, December 10, 2007 04:04, 3 refactorings, tagged with ruby, php, gettext, recursive

This recursively goes throu...

3802570ec8bc7d7689503ca7bed21862 Talk
def which_class?
  if self.language == "C/C++"
     self.language = "sh_cpp"
...

Ruby class picker

by Garrett, December 10, 2007 00:04, 8 refactorings, tagged with rails, ruby, activerecord, model

language is a column in a c...

E9674d02c33d1d711a462026f40bbaf4 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
module ModelHelpers

  def self.included(base)
...

Ruby textilize model helper

by rpheath, November 02, 2007 03:01, 3 refactorings, tagged with rails, ruby, textile, filter

OK, so I just realized ther...

E635ccff7389d9070f5e7e9fe8b36beb Talk