Guest User

Untitled

a guest
May 25th, 2018
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.22 KB | None | 0 0
  1. class State
  2. module Constants
  3. Foo = "Foo"
  4. end
  5. end
  6.  
  7. puts "Before: " + State::Constants::Foo
  8.  
  9. State::Constants.class_eval do
  10. Foo = "Bar"
  11. end
  12.  
  13. # Still prints 'Foo':
  14. puts "After: " + State::Constants::Foo
Add Comment
Please, Sign In to add comment