class Tensai::Logic::Entity
Logical entity which appears in predicates
Public Class Methods
create_subtype(name)
click to toggle source
Create a subtype with the specified name
# File lib/tensai/logic/entity.rb, line 32 def create_subtype(name) Class.new(self) do @name = Dry::Inflector.new.classify(name.to_s) end end
name()
click to toggle source
Name of entity class
# File lib/tensai/logic/entity.rb, line 25 def name @name || 'Entity' end
Public Instance Methods
inspect()
click to toggle source
# File lib/tensai/logic/entity.rb, line 17 def inspect "#{self.class.name}(#{name})" end