Module: DataMapper::Is
- Defined in:
- lib/dm-core/is.rb
Instance Method Summary collapse
Instance Method Details
#is(plugin, *pars, &block) ⇒ Object
4 5 6 7 8 9 10 11 12 |
# File 'lib/dm-core/is.rb', line 4 def is(plugin, *pars, &block) generator_method = "is_#{plugin}".to_sym if self.respond_to?(generator_method) self.send(generator_method, *pars, &block) else raise PluginNotFoundError, "could not find plugin named #{plugin}" end end |