Class: Jade::Type::Var

Inherits:
Data
  • Object
show all
Includes:
Base
Defined in:
lib/jade/type/var.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#idObject (readonly)

Returns the value of attribute id

Returns:

  • (Object)

    the current value of id



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

def id
  @id
end

#nameObject (readonly)

Returns the value of attribute name

Returns:

  • (Object)

    the current value of name



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

def name
  @name
end

Instance Method Details

#==(other) ⇒ Object



14
15
16
17
18
# File 'lib/jade/type/var.rb', line 14

def ==(other)
  return false unless other.is_a?(Var)

  id == other.id
end

#to_sObject



6
7
8
# File 'lib/jade/type/var.rb', line 6

def to_s
  name || id
end

#unbound_varsObject



10
11
12
# File 'lib/jade/type/var.rb', line 10

def unbound_vars
  [self]
end