Class: Tensai::Logic::Formulas::Atom
- Inherits:
-
Object
- Object
- Tensai::Logic::Formulas::Atom
- Defined in:
- lib/tensai/logic/formulas/atom.rb
Overview
Atomic formula
Instance Method Summary collapse
Instance Method Details
#after_initialize ⇒ Object
20 21 22 |
# File 'lib/tensai/logic/formulas/atom.rb', line 20 def after_initialize raise ArgumentError, "Invalid values #{values} for predicate #{predicate}" unless predicate.accepts? values end |
#inspect ⇒ Object
24 25 26 |
# File 'lib/tensai/logic/formulas/atom.rb', line 24 def inspect "(#{predicate.name} #{values.map { |name, value| "#{name}: #{value.inspect}" }.join(', ')})" end |