Given the situation below, why can't I access my @inst variable in the Prawn block?
calling: PdfGen.new('inst').build
class PdfGen
@class = "class"
def initialize(inst)
@inst = inst
end
def build
@inst #=> 'inst'
Prawn::Document.generate() do
@inst #=> nil
@class #=> 'class'
end
end
end
PdfGen.new('foo').buildit raises an exception because you have not formatted your generate call properly.