Guest User

Untitled

a guest
Apr 26th, 2018
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.97 KB | None | 0 0
  1. # test the no export option
  2. node.functions("uiIgnore").ignore
  3.  
  4. e.module "UI" do |m|
  5. m.module "Math" do |m_math|
  6. #function wrapping
  7. m_math.includes node.functions("uiAdd").wrap_as("add")
  8. m_math.includes node.functions("ui_Subtract").wrap_as("subtract")
  9. m_math.includes node.namespaces("DMath").functions("divide")
  10. end
  11.  
  12. #class wrapping
  13. vector = node.classes("C_UIVector").wrap_as("Vector")
  14. vector.methods("x_").wrap_as("x")
  15. vector.methods("set_x").wrap_as("x=")
  16. m.includes vector
  17.  
  18. #mapping stray functions to singleton methods
  19. modder = node.namespaces("I_LEARN_C").classes("Modder").wrap_as("Modulus")
  20. modder.includes node.namespaces("I_LEARN_C").functions("mod")
  21. modder.includes node.namespaces("I_LEARN_C").functions("mod2").wrap_as("method_mod").as_method
  22. m.includes modder
  23.  
  24. end
Add Comment
Please, Sign In to add comment