Sha256: 8a0b9b2fcf45a931fbd0d70f063c631ba13000ad0cbcc860f6adc726877093cf

Contents?: true

Size: 576 Bytes

Versions: 12

Compression:

Stored size: 576 Bytes

Contents

# frozen_string_literal: true

module Resources
  class Base < Praxis::Mapper::Resource
    include Praxis::Mapper::Resources::QueryMethods # So we can directly get wrapped models with get, all, first, last...

    def self.inherited(klass)
      klass.include Praxis::Mapper::Resources::Callbacks # So we can use callbacks (after/before/around) within resource code
      # Add the code that allows to define typed method signatures (to be validated and coerced) to the concrete class
      klass.include Praxis::Mapper::Resources::TypedMethods
      super
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
praxis-2.0.0 spec/spec_app/app/resources/base.rb
praxis-2.0.pre.40 spec/spec_app/app/resources/base.rb
praxis-2.0.pre.39 spec/spec_app/app/resources/base.rb
praxis-2.0.pre.38 spec/spec_app/app/resources/base.rb
praxis-2.0.pre.37 spec/spec_app/app/resources/base.rb
praxis-2.0.pre.36 spec/spec_app/app/resources/base.rb
praxis-2.0.pre.35 spec/spec_app/app/resources/base.rb
praxis-2.0.pre.34 spec/spec_app/app/resources/base.rb
praxis-2.0.pre.33 spec/spec_app/app/resources/base.rb
praxis-2.0.pre.32 spec/spec_app/app/resources/base.rb
praxis-2.0.pre.31 spec/spec_app/app/resources/base.rb
praxis-2.0.pre.30 spec/spec_app/app/resources/base.rb