Guest User

Untitled

a guest
Jun 21st, 2018
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. ## Source for the new method
  2.  
  3. # File activesupport/lib/active_support/callbacks.rb, line 136
  4. def initialize(kind, method, options = {})
  5. @kind = kind
  6. @method = method
  7. @identifier = options[:identifier]
  8. @options = options
  9. end
  10.  
  11.  
  12.  
  13. ## Source for the build method
  14.  
  15. # File activesupport/lib/active_support/callbacks.rb, line 80
  16.  
  17. def self.build(kind, *methods, &block)
  18. methods, options = extract_options(*methods, &block)
  19. methods.map! { |method| Callback.new(kind, method, options) }
  20. new(methods)
  21. end
Add Comment
Please, Sign In to add comment