Sha256: 12751c9cc7fec0be6848f493fcdcd84e985aebd8463644ead724a03e6985b4c2

Contents?: true

Size: 518 Bytes

Versions: 11

Compression:

Stored size: 518 Bytes

Contents

module Maintain
  module Backend
    class Base
      attr_reader :maintainer

      def aggregate(maintainee, attribute, name, options, states)
        require_method :aggregate
      end

      def read(instance, attribute)
        require_method :read
      end

      def write(instance, attribute, value)
        require_method :write
      end

      private
      def require_method(method_name)
        raise "You need to implement the ##{method_name} method in #{self.class.name}"
      end
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
maintain-0.3.0 lib/maintain/backend/base.rb
maintain-0.2.23 lib/maintain/backend/base.rb
maintain-0.2.22 lib/maintain/backend/base.rb
maintain-0.2.21 lib/maintain/backend/base.rb
maintain-0.2.20 lib/maintain/backend/base.rb
maintain-0.2.19 lib/maintain/backend/base.rb
maintain-0.2.18 lib/maintain/backend/base.rb
maintain-0.2.17 lib/maintain/backend/base.rb
maintain-0.2.16 lib/maintain/backend/base.rb
maintain-0.2.15 lib/maintain/backend/base.rb
maintain-0.2.14 lib/maintain/backend/base.rb