Sha256: 8c9a6d9187561c32692e3e7291437b032309c20e967ed004356a2b3c19bd712f

Contents?: true

Size: 679 Bytes

Versions: 23

Compression:

Stored size: 679 Bytes

Contents

module NCore
  module SingletonBase
    extend ActiveSupport::Concern

    included do
      extend Associations
      include Attributes
      include Client
      include Identity
      include Lifecycle
      include Util
    end

    module ClassMethods
      def crud(*types)
        include Build        if types.include? :build
        include Create       if types.include? :create
        include DeleteSingle if types.include? :delete
        include FindSingle   if types.include? :find
        include Update       if types.include? :update
      end

      def url
        class_name.underscore
      end
    end

    def url
      self.class.url
    end

  end
end

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
ncore-2.3.3 lib/ncore/singleton_base.rb
ncore-2.3.2 lib/ncore/singleton_base.rb
ncore-2.3.1 lib/ncore/singleton_base.rb
ncore-2.3.0 lib/ncore/singleton_base.rb
ncore-2.2.2 lib/ncore/singleton_base.rb
ncore-2.2.1 lib/ncore/singleton_base.rb
ncore-2.2.0 lib/ncore/singleton_base.rb
ncore-2.1.2 lib/ncore/singleton_base.rb
ncore-2.1.1 lib/ncore/singleton_base.rb
ncore-2.1.0 lib/ncore/singleton_base.rb
ncore-2.0.8 lib/ncore/singleton_base.rb
ncore-2.0.7 lib/ncore/singleton_base.rb
ncore-2.0.6 lib/ncore/singleton_base.rb
ncore-2.0.5 lib/ncore/singleton_base.rb
ncore-2.0.4 lib/ncore/singleton_base.rb
ncore-2.0.3 lib/ncore/singleton_base.rb
ncore-2.0.2 lib/ncore/singleton_base.rb
ncore-2.0.1 lib/ncore/singleton_base.rb
ncore-2.0.0 lib/ncore/singleton_base.rb
ncore-1.2.1 lib/ncore/singleton_base.rb