module PeppersGhost::GhostFactory
Public Instance Methods
define(&block)
click to toggle source
# File lib/peppers-ghost/ghost_factory.rb, line 2 def define(&block) instance_eval &block end
ghost(name, &block)
click to toggle source
# File lib/peppers-ghost/ghost_factory.rb, line 10 def ghost(name, &block) ghost = PeppersGhost::Ghost.new ghost.instance_eval &block ghosts[name] = ghost end
ghost_for(resource)
click to toggle source
# File lib/peppers-ghost/ghost_factory.rb, line 6 def ghost_for(resource) ghosts[resource] end
Private Instance Methods
ghosts()
click to toggle source
# File lib/peppers-ghost/ghost_factory.rb, line 18 def ghosts @ghosts ||= {} end