lib/alba.rb in alba-0.0.1 vs lib/alba.rb in alba-0.1.0
- old
+ new
@@ -1,17 +1,18 @@
require 'alba/version'
+require 'alba/resource'
require 'json'
# Core module
module Alba
class Error < StandardError; end
- def self.backend=(backend)
- @backend = backend&.to_sym
+ class << self
+ attr_reader :backend
end
- def self.backend
- @backend
+ def self.backend=(backend)
+ @backend = backend&.to_sym
end
def self.serialize(object)
fallback = ->(resource) { resource.to_json }
case backend