Class: Tensai::Logic::Variable

Inherits:
Object
  • Object
show all
Defined in:
lib/tensai/logic/variable.rb

Overview

Variable

Instance Method Summary collapse

Instance Method Details

#accepts?(value) ⇒ Boolean

Returns:

  • (Boolean)


19
20
21
22
23
# File 'lib/tensai/logic/variable.rb', line 19

def accepts?(value)
  return value.type <= type if value.is_a? Variable

  value.is_a? type
end

#inspectObject



25
26
27
# File 'lib/tensai/logic/variable.rb', line 25

def inspect
  "?#{name} - #{type.name.split('::').last}"
end