Class: Symbol

Inherits:
Object show all
Includes:
Rubylog::Assertable, Rubylog::Goal, Rubylog::Term
Defined in:
lib/rubylog/mixins/symbol.rb

Instance Method Summary collapse

Methods included from Rubylog::Goal

#solve, #true?

Methods included from Rubylog::Term

#rubylog_clone, #rubylog_deep_dereference, #rubylog_dereference, #rubylog_match_variables, #rubylog_resolve_function, #rubylog_unify, #rubylog_variables

Methods included from Rubylog::Assertable

#if, #if!, #unless

Instance Method Details

#argsObject



7
8
9
# File 'lib/rubylog/mixins/symbol.rb', line 7

def args
  []
end

#predicateObject



3
4
5
# File 'lib/rubylog/mixins/symbol.rb', line 3

def predicate
  Rubylog::NullaryPredicates[self] or raise Rubylog::ExistenceError.new(self)
end

#proveObject



20
21
22
# File 'lib/rubylog/mixins/symbol.rb', line 20

def prove
  predicate.call { yield }
end