lib/kakine/adapter.rb in kakine-0.4.0 vs lib/kakine/adapter.rb in kakine-0.5.0

- old
+ new

@@ -1,16 +1,14 @@ -require 'singleton' module Kakine - class Adapter - @@adapter = nil - include Singleton + module Adapter class << self def instance - @@adapter ||= if Kakine::Option.dryrun? - Kakine::Adapter::Mock.new - else - Kakine::Adapter::Real.new - end + @@adapter ||= + if Kakine::Option.dryrun? + Kakine::Adapter::Mock.new + else + Kakine::Adapter::Real.new + end end end end end