class Rubylog::Primitive

Public Class Methods

new(functor, callable) click to toggle source
Calls superclass method Rubylog::Predicate::new
# File lib/rubylog/primitive.rb, line 4
def initialize functor, callable
  super functor, callable.arity
  @callable = callable
end

Public Instance Methods

call(*args) { || ... } click to toggle source

calls the callable with the argumens

# File lib/rubylog/primitive.rb, line 10
def call *args
  @callable.call(*args) { yield }
end