Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # this is in notifier.rb
- module Notifier
- def print_done(msg); puts "[+] #{msg}"; end
- def print_note(msg); puts "[!] #{msg}"; end
- def print_error(msg); puts "[-] #{msg}"; end
- end
- # this is in where_i_wanna_use_this_notifier.rb
- require 'notifier'
- class WhereIWannaUseThisNotifier
- include Notifier
- def some_method
- if do_the_thing
- print_done "This thing was completed now."
- else
- print_error "ZOMG! It returned false!"
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement