lib/missionhub.rb in MissionHub-1.0.1 vs lib/missionhub.rb in MissionHub-2.0.0
- old
+ new
@@ -1,15 +1,18 @@
-Dir[File.dirname(__FILE__) + '/MissionHub/*.rb'].each do |file|
+Dir[File.dirname(__FILE__) + '/missionhub/*.rb'].each do |file|
require file
end
module MissionHub
- extend self
+ class << self
+ attr_accessor :client_id, :client_secret, :site
- attr_accessor :client_id, :client_secret, :base_uri, :org_id
+ # And we define a wrapper for the configuration block, that we'll use to set up
+ # our set of options
+ def config
+ yield self
- # And we define a wrapper for the configuration block, that we'll use to set up
- # our set of options
- def config(&block)
- instance_eval(&block)
+ self.site ||= "https://www.missionhub.com/apis/v3"
+ Base.site = site
+ end
end
end