Created
July 6, 2009 19:57
-
-
Save latompa/141643 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rubygems' | |
require 'activesupport' | |
module Fleykr | |
mattr_accessor :token | |
def self.search_photos | |
p "searching, and my token is #{Fleykr.token}" | |
end | |
end | |
Fleykr.token="123" | |
Fleykr.token="456" | |
Fleykr.search_photos | |
# output "searching, and my token is 456" | |
class FleykrSearch | |
include Fleykr | |
def initialize(token) | |
self.token=token | |
end | |
def search | |
Fleykr.search_photos | |
end | |
end | |
search1=FleykrSearch.new "123" | |
search2=FleykrSearch.new "456" | |
search1.search | |
search2.search | |
# output | |
# "searching, and my token is 456" | |
# "searching, and my token is 456" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment