Module: AdLint::Cc1::Bindable

Included in:
Memory, Object
Defined in:
lib/adlint/cc1/object.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#bindingObject

Returns the value of attribute binding.



43
44
45
# File 'lib/adlint/cc1/object.rb', line 43

def binding
  @binding
end

Instance Method Details

#be_alias_to(mem) ⇒ Object



54
55
56
57
58
59
60
61
# File 'lib/adlint/cc1/object.rb', line 54

def be_alias_to(mem)
  case mem
  when Memory
    Binding.create_alias(self, mem)
  else
    raise TypeError, "an object cannot be an alias to other objects."
  end
end

#bind_to(target) ⇒ Object



45
46
47
48
49
50
51
52
# File 'lib/adlint/cc1/object.rb', line 45

def bind_to(target)
  case target
  when Memory
    Binding.bind(self, target)
  when Object
    Binding.bind(target, self)
  end
end