charty 0.1.5.dev → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,17 +0,0 @@
1
- module Charty
2
- class AdapterNotLoadedError < RuntimeError; end
3
-
4
- class PlotterAdapter
5
- def self.inherited(adapter_class)
6
- @adapters ||= []
7
- @adapters << adapter_class
8
- end
9
-
10
- def self.create(adapter_name)
11
- require "charty/backends/#{adapter_name}"
12
- adapter = @adapters.find {|adapter| adapter::Name.to_s == adapter_name.to_s }
13
- raise AdapterNotLoadedError.new("Adapter for '#{adapter_name}' is not found.") unless adapter
14
- adapter.new
15
- end
16
- end
17
- end