Parent

Methods

Class/Module Index [+]

Quicksearch

DataMapper::Model::Hook::MethodCommand

Public Class Methods

new(model, method) click to toggle source
# File lib/dm-core/model/hook.rb, line 86
def initialize(model, method)
  @model, @method = model, method.to_sym
end

Public Instance Methods

call(resource) click to toggle source
# File lib/dm-core/model/hook.rb, line 90
def call(resource)
  resource.__send__(@method)
end
copy(model) click to toggle source
# File lib/dm-core/model/hook.rb, line 94
def copy(model)
  self.class.new(model, @method)
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.