Sha256: 58d372202ee90ccd108bc0ba156d8bd805309b44f26ebd6b5c448458aed9343e

Contents?: true

Size: 627 Bytes

Versions: 43

Compression:

Stored size: 627 Bytes

Contents

module NCore
  module Builder
    extend ActiveSupport::Concern
    
    included do
      class_eval <<-INCL, __FILE__, __LINE__+1
        include NCore::Exceptions

        module Api
          include NCore::Configuration
        end

        class Resource
          extend Api
          include NCore::Base
        end
        class SingletonResource
          extend Api
          include NCore::SingletonBase
        end

        class GenericObject < Resource
        end

        class << self
          def configure(&block)
            Api.instance_eval &block
          end
        end
      INCL
    end

  end
end

Version data entries

43 entries across 43 versions & 1 rubygems

Version Path
ncore-1.2.0 lib/ncore/builder.rb
ncore-1.1.0 lib/ncore/builder.rb
ncore-1.0.0 lib/ncore/builder.rb