
Ruby DSL blocks need access to DSL methods. But which scoping to use?
Farm.new do
animal :kitten
end
or
Farm.new do |farm|
farm.animal :kitten
end
TL;DR? You can support both!
Go read Rubylove’s article
© 2010 - VisFleet Ltd
No prawns were harmed in
the making of this website
Comments