lib/syncano/api.rb in syncano-4.0.0.alpha4 vs lib/syncano/api.rb in syncano-4.0.0.pre

- old
+ new

@@ -1,31 +1,13 @@ module Syncano class API - def initialize(connection) self.connection = connection - - self.class.initialize(connection) unless self.class.initialized? + schema = ::Syncano::Schema.new(connection) + schema.process! end - class << self - def initialize(connection) - endpoints = Schema::EndpointsWhitelist.new(Schema.new(connection)) - - resources_definitions = Resources.build_definitions(endpoints) - - include Syncano::API::Endpoints.definition(resources_definitions) - - self.initialized = true - end - - def initialized? - initialized - end - end - private attr_accessor :connection - cattr_accessor :initialized end end