Class: Logica::Predicates::Tautology

Inherits:
Base
  • Object
show all
Defined in:
lib/logica/predicates/tautology.rb

Constant Summary

Constants inherited from Base

Base::ACCEPTOR_TYPE_ID

Instance Method Summary collapse

Methods inherited from Base

#and, #and_not, #arity, #disjoint_with?, #exhaustive_with?, #generalization_of?, #iff, #implies, #method_missing, #name_and_attributes, #or, #or_not, #partially_applied_with, #portion_satisfied_by, predicate_factory, #remainder_unsatisfied_by, #respond_to_missing?, #to_method, #to_proc, #unsatisfied_by?, #xor

Methods included from ComparableByState

#==, #hash, #state

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Logica::Predicates::Base

Instance Method Details

#generalization_of_negation_of?(other) ⇒ Boolean

Returns:

  • (Boolean)


20
21
22
# File 'lib/logica/predicates/tautology.rb', line 20

def generalization_of_negation_of?(other)
  true
end

#generalization_of_other?(other) ⇒ Boolean

Returns:

  • (Boolean)


16
17
18
# File 'lib/logica/predicates/tautology.rb', line 16

def generalization_of_other?(other)
  true
end

#negatedObject



8
9
10
# File 'lib/logica/predicates/tautology.rb', line 8

def negated
  predicate_factory.contradiction
end

#satisfied_by?(*arguments) ⇒ Boolean

Returns:

  • (Boolean)


4
5
6
# File 'lib/logica/predicates/tautology.rb', line 4

def satisfied_by?(*arguments)
  true
end

#specialization_of?(other) ⇒ Boolean

Returns:

  • (Boolean)


12
13
14
# File 'lib/logica/predicates/tautology.rb', line 12

def specialization_of?(other)
  other.generalization_of_tautology?(self)
end

#to_sObject



24
25
26
# File 'lib/logica/predicates/tautology.rb', line 24

def to_s
  'TRUE |n|'
end