Advertisement
Guest User

Untitled

a guest
Jul 22nd, 2019
130
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.68 KB | None | 0 0
  1. custom_require.call(%w[common events])
  2.  
  3. class MoveBoxes
  4. include DRC
  5.  
  6. def initialize
  7. arg_definitions = [
  8. [
  9. { name: 'container', regex: /\w+/i, variable: true, description: 'Name of the container to get boxes from' },
  10. { name: 'container2', regex: /\w+/i, variable: true, description: 'Name of the container to move boxes to' }
  11. ]
  12. ]
  13.  
  14. args = parse_args(arg_definitions)
  15.  
  16. get_boxes(args.container).each { |item| move_over(args.container, item, args.container2) }
  17. end
  18.  
  19. def move_over(container, item, container2)
  20. fput("get my #{item} from my #{container}")
  21. fput("put my #{item} in my #{container2}")
  22. end
  23. end
  24.  
  25. MoveBoxes.new
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement