lib/kakine/adapter.rb in kakine-0.2.0 vs lib/kakine/adapter.rb in kakine-0.3.0
- old
+ new
@@ -1,2 +1,22 @@
require 'kakine/adapter/real'
require 'kakine/adapter/mock'
+
+module Kakine
+ class Adapter
+ def self.set_option(dryrun)
+ @@dryrun = dryrun
+ end
+
+ def self.get_instance
+ @@adapter ||= if @@dryrun
+ Kakine::Adapter::Mock.new
+ else
+ Kakine::Adapter::Real.new
+ end
+ end
+
+ private
+ def initialize
+ end
+ end
+end