module Seatbelt::Gate::ImplementationCallee

Public Instance Methods

mark_as_class_implementation() click to toggle source
# File lib/seatbelt/core/gate.rb, line 43
def mark_as_class_implementation
  lambda do |implementation_method, name|
    config = implementation_method.values.pop
    method = name.to_sym#bind(self)
    config[:method] = method
    config[:type] = :class
    implement(name, config)
  end
end
mark_as_instance_implementation() click to toggle source
# File lib/seatbelt/core/gate.rb, line 34
def mark_as_instance_implementation
  lambda do |implementation_method, name|
    config = implementation_method.values.pop
    method = self.instance_method(name).bind(self.new)
    config[:method] = method
    implement(name, config)
  end
end