Sha256: eb1c9985ea57257fef521ae8e1190863bd02270070a9763b69f1aca0f11e7202

Contents?: true

Size: 616 Bytes

Versions: 1

Compression:

Stored size: 616 Bytes

Contents

module Moysklad::Resources
  mattr_accessor :resources

  extend ActiveSupport::Autoload

  def self.register_resource resource_class
    self.resources ||= []
    self.resources << resource_class
  end

  autoload :Base
  autoload :Cached
  autoload :Indexed

  require_relative 'resources/stock'

  class Metadata < Base
    def self.entity_class
      Moysklad::Entities::EmbeddedEntityMetadata
    end
  end

  # Простые ресурсы
  %w{Goods Features CustomerOrders Warehouses Attributes Companies Consignments MyCompanies}.each do |klass_name|
    const_set klass_name, Class.new( Base )
  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
moysklad-0.0.2 lib/moysklad/resources.rb