Module: PeppersGhost::GhostFactory
- Included in:
- PeppersGhost
- Defined in:
- lib/peppers-ghost/ghost_factory.rb
Instance Method Summary collapse
Instance Method Details
#define(&block) ⇒ Object
2 3 4 |
# File 'lib/peppers-ghost/ghost_factory.rb', line 2 def define(&block) instance_eval &block end |
#ghost(name, &block) ⇒ Object
10 11 12 13 14 |
# 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) ⇒ Object
6 7 8 |
# File 'lib/peppers-ghost/ghost_factory.rb', line 6 def ghost_for(resource) ghosts[resource] end |