Method: CDK::CDKOBJS#checkBind
- Defined in:
- lib/cdk/cdk_objs.rb
#checkBind(type, key) ⇒ Object
This checks to see if the binding for the key exists: If it does then it runs the command and returns its value, normally true If it doesn’t it returns a false. This way we can ‘overwrite’ coded bindings.
348 349 350 351 352 353 354 355 356 357 358 359 360 361 |
# File 'lib/cdk/cdk_objs.rb', line 348 def checkBind(type, key) obj = self.bindableObject(type) if !(obj.nil?) && obj.binding_list.include?(key) function = obj.binding_list[key][0] data = obj.binding_list[key][1] if function == :getc return data else return function.call(type, obj, data, key) end end return false end |