1
2
3
4
class Voucher < ActiveRecord::Base
  before_create :create_vouchercode
  
...

Ruby On While loop to get unique value

by Adam, January 06, 2009 18:19 Star_fullStar_fullStar_fullStar_fullStar_full

Put those concerns in your ...

A8d3f35baafdaea851914b17dae9e1fc Talk

Ruby On includes_all?

by Tj Holowaychuk, January 06, 2009 15:46

Ah thanks. Still wrapping m...

F1e3ab214a976a39cfd713bc93deb10f Talk
1
2
3
4
class Constraint
  def particle
    ParticleConstraint.new(@owner.particles[index], self)
...

Ruby On ruby metaprogramming

by Adam, January 06, 2009 06:34 Star_fullStar_fullStar_fullStar_full

I think you need to rethink...

A8d3f35baafdaea851914b17dae9e1fc Talk
1
2
3
4
module Enumerable
  def include_all?(*objects)
    objects.all? { |object| include?(object) }
...

Ruby On includes_all?

by Adam, January 06, 2009 06:14
A8d3f35baafdaea851914b17dae9e1fc Talk
1
2
3
4
object.constraints.each do |c|
  p = object.particles[c.index]
  p.component_set(c.component,c.value) if p.component_value(c.component).send(c.dir, c.value)
...

Ruby On ruby metaprogramming

by micktaiwan, January 06, 2009 02:32

And by replacing :inf or :s...

2f6686bd2c6bb633a1cbf7b5a73c8491 Talk
1
2
3
4
class SomeObject
  def component_set(component,value)
    send("#{component}=", value)
...

Ruby On ruby metaprogramming

by micktaiwan, January 06, 2009 02:19

Nice ! Thanks.

So I unders...

2f6686bd2c6bb633a1cbf7b5a73c8491 Talk
1
2
3
4
class SomeObjectWithComponent
  def component_value=(value)
    send("#{component}=", value)
...

Ruby On ruby metaprogramming

by danielharan, January 06, 2009 01:47 Star_fullStar_fullStar_fullStar_full

c.component sounds like a t...

880cbab435f00197613c9cc2065b4f5a Talk
1
2
3
4
require 'ostruct'
require 'rubygems'
...

Ruby On includes_all?

by Tj Holowaychuk, January 05, 2009 21:21

bahah.. k this is a bit cle...

F1e3ab214a976a39cfd713bc93deb10f Talk

Ruby On Screen Scraping Google with...

by vivnet.myopenid.com, January 05, 2009 02:59

does anyone have ideas on i...

96fc4d971dd7148565c9b13188519cb7 Talk

Ruby On Screen Scraping Google with...

by Tj Holowaychuk, January 03, 2009 03:59

I actually am working on an...

F1e3ab214a976a39cfd713bc93deb10f Talk
1
2
3
4
require 'open-uri'
require 'rubygems'
require 'rubyful_soup'
...

Ruby On Screen Scraping Google with...

by Matt Downey, January 02, 2009 23:06

Well, to answer your questi...

37cebc7c6f4cee5d5bc34277e691e7ba Talk
1
2
3
4
require 'activesupport'

class Fixture
...

Ruby On Command Pattern from Head F...

by Adam, January 02, 2009 20:06

Shouldn't the object hold t...

A8d3f35baafdaea851914b17dae9e1fc Talk

Ruby On Screen Scraping Google with...

by vivnet.myopenid.com, January 02, 2009 15:39

Hi guys, I'm interested in ...

96fc4d971dd7148565c9b13188519cb7 Talk
1
2
3
4
require 'rubygems'
require 'json'
require 'net/http'
...

Ruby On Screen Scraping Google with...

by Matt Downey, January 02, 2009 08:33

The first 65 results are ea...

37cebc7c6f4cee5d5bc34277e691e7ba Talk
1
2
3
4
class Word < Struct.new(:brew)
  def to_s
    count = Hash.new(0)
...

Ruby On Newb needs some cleanup

by bob, December 26, 2008 08:30
Avatar Talk

Ruby On Conditionally deleting colu...

by srboisvert.myopenid.com, December 25, 2008 15:11

It's mostly that I just wan...

12d6a2e5971e661ee2bf2994526e848d Talk
1
puts Word.new('rdapepa epdemrtrfx,feyefryeemcprt,cn ct, zaaaxdam')

Ruby On Newb needs some cleanup

by mischamolhoek.myopenid.com, December 24, 2008 08:02

@adam - your right, it was ...

D7a31f22c11776898826f7c1ed0ff80a Talk

Ruby On Sequel threaded benchmark

by cheapdomain, December 24, 2008 06:16

Nowadays many companys are ...

E79ad0263bd0a2a51db5b5f9bc949941 Talk

Ruby On Newb needs some cleanup

by Ollie , December 23, 2008 22:55

I couldn't do any better th...

Be072eb0e9f6f81c20541150cabce3ab Talk

Ruby On Newb needs some cleanup

by Adam, December 23, 2008 17:57

@redpidgin - I'm not sure w...

A8d3f35baafdaea851914b17dae9e1fc Talk
1
2
3
4
require 'enumerable'
brew = "rdadadroxmocpronogomocdmqzx"
brew = brew.split(//);
...

Ruby On Newb needs some cleanup

by mischamolhoek.myopenid.com, December 23, 2008 17:37

if you like oneliners.... :...

D7a31f22c11776898826f7c1ed0ff80a Talk

Ruby On Newb needs some cleanup

by redpidgin, December 23, 2008 16:44

thank you very much, works ...

5ce36f73f075f18632c284f56cedd23d Talk
1
2
3
4
class Word < Struct.new(:brew)
  def to_s
    count = Hash.new(0)
...

Ruby On Newb needs some cleanup

by Adam, December 23, 2008 16:37 Star_fullStar_fullStar_fullStar_full
A8d3f35baafdaea851914b17dae9e1fc Talk

Ruby On very simple .srt resyncroniser

by mischamolhoek.myopenid.com, December 23, 2008 08:24

that's about as short as it...

D7a31f22c11776898826f7c1ed0ff80a Talk
1
2
3
4
  def enumerate_infinitely_with(expected)
    simple_matcher('enumerate infinitely with') do |given, matcher|
      matcher.failure_message = "expected #{given} to enumerate infinitely with #{expected}"
...

Ruby On RSpec example does not cont...

by Ollie , December 23, 2008 07:13

Whoops! I missed this featu...

Be072eb0e9f6f81c20541150cabce3ab Talk