Sha256: 0ebadb4466c30ef8d904e4adfb6298faf04851ef4c6802d1ca905597023c3673

Contents?: true

Size: 409 Bytes

Versions: 23

Compression:

Stored size: 409 Bytes

Contents

module NCore
  module Identity
    extend ActiveSupport::Concern

    module ClassMethods
      def class_name
        self.name.split('::')[-1]
      end

      def module_name
        self.name.split('::')[0..-2].join('::')
      end

      def attrib_name
        class_name.underscore
      end
      alias :json_root :attrib_name
    end


    def json_root
      self.class.json_root
    end

  end
end

Version data entries

23 entries across 23 versions & 1 rubygems

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