Class: Rbprolog::Var

Inherits:
Object
  • Object
show all
Defined in:
lib/rbprolog/var.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(sym) ⇒ Var

Returns a new instance of Var.



5
6
7
# File 'lib/rbprolog/var.rb', line 5

def initialize(sym)
  @sym = sym
end

Instance Attribute Details

#symObject

Returns the value of attribute sym.



3
4
5
# File 'lib/rbprolog/var.rb', line 3

def sym
  @sym
end

Instance Method Details

#==(other) ⇒ Object



13
14
15
# File 'lib/rbprolog/var.rb', line 13

def ==(other)
  true
end

#to_sObject



9
10
11
# File 'lib/rbprolog/var.rb', line 9

def to_s
  @sym.to_s
end