Skip to content

Instantly share code, notes, and snippets.

View kunzmann's full-sized avatar

Joshua Kunzmann kunzmann

  • Sydney, Australia
View GitHub Profile
@kunzmann
kunzmann / gist:1471853
Created December 13, 2011 11:50 — forked from agrimm/gist:1471685
super from ROROsyd
module Baz
def hello
"baz " + super
end
end
module Bar
def hello
"bar "
end
@kunzmann
kunzmann / gist:750756
Created December 21, 2010 22:54
Refactoring
class Foo
include Mongoid::Document
field :bar, :type => Array
end
# ruby-1.9.2-p0 > Foo.create(:bars => [1,2,3])
# => #<Foo _id: 4d1128c4fddc0d2146000001, bars: [1, 2, 3]>
# ruby-1.9.2-p0 > Foo.first.bars
# => [1, 2, 3]