class Tryouts::Tryout::DrillContext
The before and after blocks are also run in this context.
instance variables are not carried through, but class variables are.
Each Drill is executed in a new instance of this class. That means
All :api Drills are run within this context (not used for :cli).
def has_dream?; @has_dream; end
def has_dream?; @has_dream; end
def initialize; @stash = Tryouts::HASH_TYPE.new; @has_dream = false; end
def initialize; @stash = Tryouts::HASH_TYPE.new; @has_dream = false; end
def stash(*args)
stash :name, 'some value' # => 'some value'
and return the new value. e.g.
If called with arguments, it will add a new value to the +@stash+
If called with no arguments, returns +@stash+.
def stash(*args) return @stash if args.empty? @stash[args[0]] = args[1] args[1] end